From: Peter Palfrader Date: Sun, 19 Aug 2018 09:43:10 +0000 (+0200) Subject: Move default webpage from apache to webserver module X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=738ce8961d5cf4560c44a2ebacfeef0bef5f6be1;p=mirror%2Fdsa-puppet.git Move default webpage from apache to webserver module --- diff --git a/modules/apache2/manifests/init.pp b/modules/apache2/manifests/init.pp index ce7c9273b..d20039104 100644 --- a/modules/apache2/manifests/init.pp +++ b/modules/apache2/manifests/init.pp @@ -119,19 +119,6 @@ class apache2 { source => 'puppet:///modules/apache2/apache2.logrotate', } - file { [ '/srv/www', '/srv/www/default.debian.org', '/srv/www/default.debian.org/htdocs', '/srv/www/default.debian.org/htdocs-disabled' ]: - ensure => directory, - mode => '0755', - } - - file { '/srv/www/default.debian.org/htdocs/index.html': - content => template('apache2/default-index.html'), - } - - file { '/srv/www/default.debian.org/htdocs-disabled/index.html': - content => template('apache2/disabled-index.html'), - } - file { '/var/log/apache2': ensure => directory, mode => '0755', diff --git a/modules/apache2/templates/default-index.html b/modules/apache2/templates/default-index.html deleted file mode 100644 index c8c9c4019..000000000 --- a/modules/apache2/templates/default-index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - Welcome to <%= @hostname %>! - - - -

Welcome to <%= @hostname %>!

- -This is <%= @hostname %>, a system run by and for the Debian Project. -She does stuff. -What kind of stuff and who our kind sponsors are you might learn on -db.debian.org. - -

-


-DSA - - - diff --git a/modules/apache2/templates/disabled-index.html b/modules/apache2/templates/disabled-index.html deleted file mode 100644 index 104efd48a..000000000 --- a/modules/apache2/templates/disabled-index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - Welcome to <%= @hostname %>! - - - -

Welcome to <%= @hostname %>!

- -This is <%= @hostname %>, a system run by and for the Debian Project. -

-The service you have requested is currently disabled. -

-The reason for that and who our kind sponsors are you might learn on -db.debian.org. - -

-


-DSA - - - diff --git a/modules/webserver/manifests/defaultpage.pp b/modules/webserver/manifests/defaultpage.pp new file mode 100644 index 000000000..29c7e05d6 --- /dev/null +++ b/modules/webserver/manifests/defaultpage.pp @@ -0,0 +1,15 @@ +# +class webserver::defaultpage { + file { [ '/srv/www', '/srv/www/default.debian.org', '/srv/www/default.debian.org/htdocs', '/srv/www/default.debian.org/htdocs-disabled' ]: + ensure => directory, + mode => '0755', + } + + file { '/srv/www/default.debian.org/htdocs/index.html': + content => template('webserver/default-index.html'), + } + + file { '/srv/www/default.debian.org/htdocs-disabled/index.html': + content => template('webserver/disabled-index.html'), + } +} diff --git a/modules/webserver/manifests/init.pp b/modules/webserver/manifests/init.pp index 6ffcfaaf6..f73f8dffe 100644 --- a/modules/webserver/manifests/init.pp +++ b/modules/webserver/manifests/init.pp @@ -1,5 +1,7 @@ # class webserver { + include webserver::defaultpage + file { '/etc/cron.d/puppet-export-scheduled-shutdown': ensure => absent, } concat::fragment { 'dsa-puppet-stuff--webserver-export-shutdown': target => '/etc/cron.d/dsa-puppet-stuff', diff --git a/modules/webserver/templates/default-index.html b/modules/webserver/templates/default-index.html new file mode 100644 index 000000000..c8c9c4019 --- /dev/null +++ b/modules/webserver/templates/default-index.html @@ -0,0 +1,20 @@ + + + + Welcome to <%= @hostname %>! + + + +

Welcome to <%= @hostname %>!

+ +This is <%= @hostname %>, a system run by and for the Debian Project. +She does stuff. +What kind of stuff and who our kind sponsors are you might learn on +db.debian.org. + +

+


+DSA + + + diff --git a/modules/webserver/templates/disabled-index.html b/modules/webserver/templates/disabled-index.html new file mode 100644 index 000000000..104efd48a --- /dev/null +++ b/modules/webserver/templates/disabled-index.html @@ -0,0 +1,22 @@ + + + + Welcome to <%= @hostname %>! + + + +

Welcome to <%= @hostname %>!

+ +This is <%= @hostname %>, a system run by and for the Debian Project. +

+The service you have requested is currently disabled. +

+The reason for that and who our kind sponsors are you might learn on +db.debian.org. + +

+


+DSA + + +