Skip to content

Commit

Permalink
Merge pull request #27 from francois/optional-chroot
Browse files Browse the repository at this point in the history
Made chroot optional
  • Loading branch information
hunner committed Aug 16, 2013
2 parents ba514ad + 8c0ea26 commit aa3c0f2
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,26 @@
}
}

file { $global_options['chroot']:
ensure => directory,
if $global_options['chroot'] {
file { $global_options['chroot']:
ensure => directory,
}
}

}

if $manage_service {
if $global_options['chroot'] {
$deps = [
Concat['/etc/haproxy/haproxy.cfg'],
File[$global_options['chroot']],
]
} else {
$deps = [
Concat['/etc/haproxy/haproxy.cfg'],
]
}

service { 'haproxy':
ensure => $enable ? {
true => running,
Expand All @@ -131,10 +144,7 @@
name => 'haproxy',
hasrestart => true,
hasstatus => true,
require => [
Concat['/etc/haproxy/haproxy.cfg'],
File[$global_options['chroot']],
],
require => $deps,
}
}
}

0 comments on commit aa3c0f2

Please sign in to comment.