summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2014-10-12 12:18:05 +0200
committermh <mh@immerda.ch>2014-10-12 12:18:05 +0200
commit9a5b4d4b56ce78d918ef6a978047bdc4d9bfb72a (patch)
tree01f57acdcfe233872eb496b2bafa1f7c3979f890 /manifests
parent5b8288629495c1b84a61880c9bcfef21e84b4b12 (diff)
a first shot of tests
Diffstat (limited to 'manifests')
-rw-r--r--manifests/file/rw.pp17
-rw-r--r--manifests/gentoo.pp59
-rw-r--r--manifests/init.pp8
-rw-r--r--manifests/vhost/php/silverstripe.pp2
-rw-r--r--manifests/vhost/php/typo3.pp2
-rw-r--r--manifests/vhost/php/wordpress.pp2
6 files changed, 48 insertions, 42 deletions
diff --git a/manifests/file/rw.pp b/manifests/file/rw.pp
index 87b666f..0f258bf 100644
--- a/manifests/file/rw.pp
+++ b/manifests/file/rw.pp
@@ -1,12 +1,13 @@
+# a file that is writable by apache
define apache::file::rw(
- $owner = root,
- $group = 0,
- $mode = 0660
+ $owner = root,
+ $group = 0,
+ $mode = '0660',
) {
- apache::file{$name:
- owner => $owner,
- group => $group,
- mode => $mode,
- }
+ apache::file{$name:
+ owner => $owner,
+ group => $group,
+ mode => $mode,
+ }
}
diff --git a/manifests/gentoo.pp b/manifests/gentoo.pp
index 86be087..3a13977 100644
--- a/manifests/gentoo.pp
+++ b/manifests/gentoo.pp
@@ -1,34 +1,39 @@
### gentoo
class apache::gentoo inherits apache::package {
- $config_dir = '/etc/apache2'
+ $config_dir = '/etc/apache2'
- # needs module gentoo
- gentoo::etcconfd {
- apache2: require => "Package[apache]",
- notify => Service[apache],
- }
- Package[apache]{
- category => 'www-servers',
- }
- File[vhosts_dir]{
- path => "$config_dir/vhosts.d",
- }
- File[modules_dir]{
- path => "$config_dir/modules.d",
- }
+ # needs module gentoo
+ gentoo::etcconfd {
+ 'apache2':
+ require => Package['apache'],
+ notify => Service['apache'],
+ }
+ Package['apache']{
+ category => 'www-servers',
+ }
+ File[vhosts_dir]{
+ path => "${config_dir}/vhosts.d",
+ }
+ File[modules_dir]{
+ path => "${config_dir}/modules.d",
+ }
- apache::gentoo::module { '00_default_settings': }
- apache::gentoo::module { '00_error_documents': }
- apache::config::file { 'default_vhost.include':
- source => "apache/vhosts.d/default_vhost.include",
- destination => "$config_dir/vhosts.d/default_vhost.include",
- }
+ apache::gentoo::module{
+ '00_default_settings':;
+ '00_error_documents':;
+ }
+ apache::config::file { 'default_vhost.include':
+ source => 'apache/vhosts.d/default_vhost.include',
+ destination => "${config_dir}/vhosts.d/default_vhost.include",
+ }
- # set the default for the ServerName
- file{"${config_dir}/modules.d/00_default_settings_ServerName.conf":
- content => "ServerName ${::fqdn}\n",
- require => Package[apache],
- owner => root, group => 0, mode => 0644;
- }
+ # set the default for the ServerName
+ file{"${config_dir}/modules.d/00_default_settings_ServerName.conf":
+ content => "ServerName ${::fqdn}\n",
+ require => Package[apache],
+ owner => root,
+ group => 0,
+ mode => '0644';
+ }
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 87149d8..a974c9c 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -14,11 +14,11 @@
# manage a simple apache
class apache(
- $cluster_node = '',
+ $cluster_node = '',
$manage_shorewall = false,
- $manage_munin = false,
- $no_default_site = false,
- $ssl = false
+ $manage_munin = false,
+ $no_default_site = false,
+ $ssl = false
) {
case $::operatingsystem {
centos: { include apache::centos }
diff --git a/manifests/vhost/php/silverstripe.pp b/manifests/vhost/php/silverstripe.pp
index e7c7f24..81b0d7f 100644
--- a/manifests/vhost/php/silverstripe.pp
+++ b/manifests/vhost/php/silverstripe.pp
@@ -72,7 +72,7 @@ define apache::vhost::php::silverstripe(
default => "${path}/www"
}
$modsec_rules = ['960010']
- $real_mod_security_rules_to_disable = array_union($mod_security_rules_to_disable,$modsec_rules)
+ $real_mod_security_rules_to_disable = union($mod_security_rules_to_disable,$modsec_rules)
# create vhost configuration file
::apache::vhost::php::webapp{$name:
diff --git a/manifests/vhost/php/typo3.pp b/manifests/vhost/php/typo3.pp
index 518f898..a963c70 100644
--- a/manifests/vhost/php/typo3.pp
+++ b/manifests/vhost/php/typo3.pp
@@ -70,7 +70,7 @@ define apache::vhost::php::typo3(
}
$modsec_rules = ['960010']
- $real_mod_security_rules_to_disable = array_union($mod_security_rules_to_disable,$modsec_rules)
+ $real_mod_security_rules_to_disable = union($mod_security_rules_to_disable,$modsec_rules)
if $mod_security_additional_options == 'absent' {
$real_mod_security_additional_options = '
<Location "/typo3">
diff --git a/manifests/vhost/php/wordpress.pp b/manifests/vhost/php/wordpress.pp
index 268f33e..00e1898 100644
--- a/manifests/vhost/php/wordpress.pp
+++ b/manifests/vhost/php/wordpress.pp
@@ -70,7 +70,7 @@ define apache::vhost::php::wordpress(
default => "${path}/www"
}
$modsec_rules = ["960010", "950018"]
- $real_mod_security_rules_to_disable = array_union($mod_security_rules_to_disable,$modsec_rules)
+ $real_mod_security_rules_to_disable = union($mod_security_rules_to_disable,$modsec_rules)
# create vhost configuration file
apache::vhost::php::webapp{$name: