From ad7938eba24b0a19fb60ccb82286c29f53b8fc7c Mon Sep 17 00:00:00 2001 From: Richard Nghiem Date: Tue, 19 Nov 2013 02:10:00 +0000 Subject: [PATCH] add support for haproxy version --- manifests/init.pp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 2db523b8..5bf93250 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 {