summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHunter Haugen <h.haugen@gmail.com>2012-10-12 12:12:42 -0700
committerHunter Haugen <h.haugen@gmail.com>2012-10-12 12:12:42 -0700
commit2b6eb8d3121d57fb71b43123a50bb2f270371f38 (patch)
treec5edf1169d031b24275744b778ad999528e70462
parent362d0ebf99b9dbfde8027646a84bf35f809be64f (diff)
Use selector for haproxy service
There are no spec tests to verify dependencies on a successful compilation, so I missed this
-rw-r--r--manifests/init.pp11
1 files changed, 8 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 92df8b8..61d5785 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -81,7 +81,10 @@ class haproxy (
group => '0',
mode => '0644',
require => Package['haproxy'],
- notify => Service['haproxy'],
+ notify => $manage_service ? {
+ true => Service['haproxy'],
+ false => undef,
+ },
}
# Simple Header
@@ -102,13 +105,15 @@ class haproxy (
file { '/etc/default/haproxy':
content => 'ENABLED=1',
require => Package['haproxy'],
- before => Service['haproxy'],
+ before => $manage_service ? {
+ true => Service['haproxy'],
+ false => undef,
+ },
}
}
file { $global_options['chroot']:
ensure => directory,
- before => Service['haproxy'],
}
}