diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-11-08 11:23:38 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-11-08 11:23:38 -0200 |
commit | e44524589d7136a262d7a264535b736c8881c977 (patch) | |
tree | 7859286b94207b5bf0eabd6f5e579a4e01d5589a | |
parent | dc55b9e430c4ed371750128af15d480627748f45 (diff) | |
download | puppet-apache-e44524589d7136a262d7a264535b736c8881c977.tar.gz puppet-apache-e44524589d7136a262d7a264535b736c8881c977.tar.bz2 |
Moving out require parameter from module definition
-rw-r--r-- | manifests/init.pp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 1c78723..cd220da 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -50,7 +50,7 @@ class apache { module { "macro": ensure => present, - require => "mod_macro", + require => Package["mod_macro"], } # apache mod_macro configuration @@ -127,14 +127,13 @@ class apache { # You can add a custom require (string) if the module depends on # packages that aren't part of the default apache2 package. Because of # the package dependencies, apache2 will automagically be included. - define module($ensure = 'present', $require = 'apache2') { + define module($ensure = 'present') { case $ensure { 'present': { exec { "/usr/sbin/a2enmod $name": unless => "/bin/sh -c '[ -L ${apache2_mods}-enabled/${name}.load ] \ && [ ${apache2_mods}-enabled/${name}.load -ef ${apache2_mods}-available/${name}.load ]'", notify => Exec["force-reload-apache2"], - require => Package[$require], } } 'absent': { @@ -142,7 +141,6 @@ class apache { onlyif => "/bin/sh -c '[ -L ${apache2_mods}-enabled/${name}.load ] \ && [ ${apache2_mods}-enabled/${name}.load -ef ${apache2_mods}-available/${name}.load ]'", notify => Exec["force-reload-apache2"], - require => Package["apache2"], } } default: { err ("Unknown ensure value: '$ensure'") } |