Fixed variable passing to abusehelper::init on puppet 3

This commit is contained in:
Ossi Salmi 2013-07-30 15:56:09 +03:00
parent eb08500518
commit baf347204b
3 changed files with 10 additions and 15 deletions

View file

@ -126,7 +126,9 @@ class abusehelper {
} }
if $abusehelper_botnets { if $abusehelper_botnets {
include abusehelper::init class { "abusehelper::init":
botnets => $abusehelper_botnets,
}
} }
} }
@ -134,15 +136,7 @@ class abusehelper {
# Install abusehelper init script. # Install abusehelper init script.
# #
class abusehelper::init { class abusehelper::init($botnets, $user="abusehel") {
if !$abusehelper_botnets {
fail("Must define \$abusehelper_botnets")
}
if !$abusehelper_user {
$abusehelper_user = "abusehel"
}
file { "/etc/sysconfig/botnet": file { "/etc/sysconfig/botnet":
ensure => present, ensure => present,

View file

@ -1,2 +1,2 @@
BOTUSER="<%= @abusehelper_user %>" BOTUSER="<%= @user %>"
BOTNETS="<%= @abusehelper_botnets.join(" ") %>" BOTNETS="<%= @botnets.join(" ") %>"

View file

@ -89,9 +89,10 @@ class abusesa {
python::setup::install { "/usr/local/src/abusesa": } python::setup::install { "/usr/local/src/abusesa": }
if $abusesa_botnets { if $abusesa_botnets {
$abusehelper_botnets = $abusesa_botnets class { "abusehelper::init":
$abusehelper_user = "abusesa" botnets => $abusesa_botnets,
include abusehelper::init user => "abusesa",
}
} }
} }