diff options
author | varac <varacanero@zeromail.org> | 2015-05-11 21:19:38 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2015-05-11 21:19:38 +0200 |
commit | acff4b9a8a11f4eb37a00bb8b22a708abf5127bc (patch) | |
tree | 9b914c82b9d0e276bdb674981fbb313f9ae3afd4 | |
parent | 3d437b37d62319c47d355998ab61483cd3ac1da3 (diff) |
linted manifests/debian/module.pp
-rw-r--r-- | manifests/debian/module.pp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/manifests/debian/module.pp b/manifests/debian/module.pp index 4c100fa..9688430 100644 --- a/manifests/debian/module.pp +++ b/manifests/debian/module.pp @@ -1,3 +1,4 @@ +# install/remove apache module on debian/ubuntu systems define apache::debian::module( $ensure = present, $package_name = 'absent' @@ -6,8 +7,8 @@ define apache::debian::module( if ($package_name != 'absent') { package { $package_name: - ensure => $ensure, - notify => Service['apache'], + ensure => $ensure, + notify => Service['apache'], require => Package['apache'], } } @@ -15,20 +16,20 @@ define apache::debian::module( case $ensure { 'absent','purged': { exec { "/usr/sbin/a2dismod ${name}": - onlyif => "/bin/sh -c '[ -L ${modules_dir}-enabled/${name}.load ] \\ + onlyif => "/bin/sh -c '[ -L ${modules_dir}-enabled/${name}.load ] \\ && [ ${modules_dir}-enabled/${name}.load -ef ${modules_dir}-available/${name}.load ]'", - notify => Service['apache'], + notify => Service['apache'], require => Package['apache'], } } default : { exec { "/usr/sbin/a2enmod ${name}": - unless => "/bin/sh -c '[ -L ${modules_dir}-enabled/${name}.load ] \\ + unless => "/bin/sh -c '[ -L ${modules_dir}-enabled/${name}.load ] \\ && [ ${modules_dir}-enabled/${name}.load -ef ${modules_dir}-available/${name}.load ]'", - notify => Service['apache'], + notify => Service['apache'], require => $package_name ? { 'absent' => Package['apache'], - default => Package[['apache',$package_name]], + default => Package[['apache',$package_name]], }, } } |