Skip to content

Commit

Permalink
logstash_version parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
thepwagner committed Mar 7, 2014
1 parent a21373d commit 38ab65a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

file_fragment { 'header':
tag => "beaver_config_${::fqdn}",
content => "[beaver]\n${beaver::config}\n",
content => "[beaver]\n${beaver::config}\nlogstash_version = ${::beaver::logstash_version}\n",
order => 10
}

Expand Down
23 changes: 14 additions & 9 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,16 @@
# * Richard Pijnenburg <mailto:[email protected]>
#
class beaver(
$ensure = $beaver::params::ensure,
$autoupgrade = $beaver::params::autoupgrade,
$status = $beaver::params::status,
$version = false,
$format = 'json',
$respawn_delay = 3,
$max_failure = 7,
$hostname = $::fqdn,
$transport = 'redis'
$ensure = $beaver::params::ensure,
$autoupgrade = $beaver::params::autoupgrade,
$status = $beaver::params::status,
$version = false,
$format = 'json',
$respawn_delay = 3,
$max_failure = 7,
$hostname = $::fqdn,
$transport = 'redis',
$logstash_version = '0'
) inherits beaver::params {

#### Validate parameters
Expand All @@ -137,6 +138,10 @@
fail("\"${format}\" is not a valid format parameter value")
}

if ! ($logstash_version in [ '0', '1' ]) {
fail("\"${logstash_version}\" is not a valid logstash_version parameter value")
}

if ! is_numeric($respawn_delay) {
fail("\"${respawn_delay}\" is not a valid respawn_delay parameter value")
}
Expand Down

0 comments on commit 38ab65a

Please sign in to comment.