summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp35
1 files changed, 19 insertions, 16 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index c36b1ae..7bf6aa9 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -64,6 +64,7 @@
# Gary Larizza <gary@puppetlabs.com>
#
class haproxy (
+ $manage_service = true,
$enable = true,
$haproxy_global_options = $haproxy::data::haproxy_global_options,
$haproxy_defaults_options = $haproxy::data::haproxy_defaults_options
@@ -116,21 +117,23 @@ class haproxy (
}
- service { 'haproxy':
- ensure => $enable ? {
- true => running,
- false => stopped,
- },
- enable => $enable ? {
- true => true,
- false => false,
- },
- name => 'haproxy',
- hasrestart => true,
- hasstatus => true,
- require => [
- Concat['/etc/haproxy/haproxy.cfg'],
- File[$haproxy_global_options['chroot']],
- ],
+ if $manage_service {
+ service { 'haproxy':
+ ensure => $enable ? {
+ true => running,
+ false => stopped,
+ },
+ enable => $enable ? {
+ true => true,
+ false => false,
+ },
+ name => 'haproxy',
+ hasrestart => true,
+ hasstatus => true,
+ require => [
+ Concat['/etc/haproxy/haproxy.cfg'],
+ File[$haproxy_global_options['chroot']],
+ ],
+ }
}
}