aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-03-17 10:53:59 +0000
committerMichael Scherer <misc@mageia.org>2012-03-17 10:53:59 +0000
commitcc782be3aed069c1c538e90358f0f0647bb2e425 (patch)
tree41d7a0fd4b072ee013383ec4bb0716c23383b763 /modules
parentf4ca0baf9d1a04a188b75615c4835777e4d9ecfd (diff)
downloadpuppet-cc782be3aed069c1c538e90358f0f0647bb2e425.tar
puppet-cc782be3aed069c1c538e90358f0f0647bb2e425.tar.gz
puppet-cc782be3aed069c1c538e90358f0f0647bb2e425.tar.bz2
puppet-cc782be3aed069c1c538e90358f0f0647bb2e425.tar.xz
puppet-cc782be3aed069c1c538e90358f0f0647bb2e425.zip
split web class into a module, and clean it
Diffstat (limited to 'modules')
-rw-r--r--modules/bcd/manifests/init.pp23
-rw-r--r--modules/bcd/manifests/web.pp20
2 files changed, 20 insertions, 23 deletions
diff --git a/modules/bcd/manifests/init.pp b/modules/bcd/manifests/init.pp
index b4c7a03b..2dfd88df 100644
--- a/modules/bcd/manifests/init.pp
+++ b/modules/bcd/manifests/init.pp
@@ -41,27 +41,4 @@ class bcd {
}
- class web inherits base {
- apache::vhost_base { "bcd.$domain":
- location => "$bcd_home/public_html",
- content => template('bcd/vhost_bcd.conf'),
- }
- file {"htaccess":
- path => "$bcd_home/public_html/.htaccess",
- ensure => present,
- owner => bcd,
- group => bcd,
- mode => 755,
- content => template("bcd/.htaccess")
- }
- file {"htpasswd":
- path => "$bcd_home/public_html/.htpasswd",
- ensure => present,
- owner => bcd,
- group => bcd,
- mode => 755,
- content => template("bcd/.htpasswd")
- }
- }
-
}
diff --git a/modules/bcd/manifests/web.pp b/modules/bcd/manifests/web.pp
new file mode 100644
index 00000000..fba6df1c
--- /dev/null
+++ b/modules/bcd/manifests/web.pp
@@ -0,0 +1,20 @@
+class bcd::web {
+ include bcd::base
+ $bcd_home = $bcd::variable::bcd_home
+
+ apache::vhost_base { "bcd.$::domain":
+ location => "$bcd_home/public_html",
+ content => template('bcd/vhost_bcd.conf'),
+ }
+
+ # TODO should be merged with main file
+ file { "$bcd_home/public_html/.htaccess":
+ content => template('bcd/.htaccess')
+ }
+
+ # not sure if that's useful, since the file is public and trivially
+ # bruteforced
+ file { "$bcd_home/public_html/.htpasswd":
+ content => template('bcd/.htpasswd')
+ }
+}