summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-05-11 21:25:06 +0200
committervarac <varacanero@zeromail.org>2015-05-11 21:25:06 +0200
commitb4a7f74268b71c3c63f460b3c86287aa0806c237 (patch)
treeee9fb9ec27206f30dd2abb61ef98ac96c02f0da7 /manifests
parentacff4b9a8a11f4eb37a00bb8b22a708abf5127bc (diff)
Fix ordering between purging and adding/removing modules for debian
Before, purging files from the `mods-enabled` dir and adding modules to this dir happened unordered, meaning that some modules are added before all old modules are purged. Puppet (3.7.2) somehow screws this up and some modules are not installed that should be. see https://gitlab.com/shared-puppet-modules-group/apache/issues/6 for details
Diffstat (limited to 'manifests')
-rw-r--r--manifests/debian/module.pp9
1 files changed, 6 insertions, 3 deletions
diff --git a/manifests/debian/module.pp b/manifests/debian/module.pp
index 9688430..252948f 100644
--- a/manifests/debian/module.pp
+++ b/manifests/debian/module.pp
@@ -9,7 +9,7 @@ define apache::debian::module(
package { $package_name:
ensure => $ensure,
notify => Service['apache'],
- require => Package['apache'],
+ require => [ File['modules_dir'], Package['apache'] ],
}
}
@@ -27,10 +27,13 @@ define apache::debian::module(
unless => "/bin/sh -c '[ -L ${modules_dir}-enabled/${name}.load ] \\
&& [ ${modules_dir}-enabled/${name}.load -ef ${modules_dir}-available/${name}.load ]'",
notify => Service['apache'],
- require => $package_name ? {
+ require => [
+ File['modules_dir'],
+ $package_name ? {
'absent' => Package['apache'],
default => Package[['apache',$package_name]],
- },
+ }
+ ],
}
}
}