Skip to content

Commit

Permalink
add support for haproxy version
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Nghiem committed Nov 19, 2013
1 parent 0d4c50e commit ad7938e
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,24 @@
$enable = true,
$global_options = $haproxy::params::global_options,
$defaults_options = $haproxy::params::defaults_options,
$package_name = 'haproxy'
$package_name = 'haproxy',
$version = undef
) inherits haproxy::params {
include concat::setup

package { $package_name:
ensure => $enable ? {
true => present,
false => absent,
},
alias => 'haproxy',
if $version {
package { $package_name:
ensure => $version,
alias => 'haproxy',
}
} else {
package { $package_name:
ensure => $enable ? {
true => present,
false => absent,
},
alias => 'haproxy',
}
}

if $enable {
Expand Down

0 comments on commit ad7938e

Please sign in to comment.