Fixed variable passing to abusehelper::init on puppet 3
This commit is contained in:
parent
eb08500518
commit
baf347204b
3 changed files with 10 additions and 15 deletions
|
@ -126,7 +126,9 @@ class abusehelper {
|
|||
}
|
||||
|
||||
if $abusehelper_botnets {
|
||||
include abusehelper::init
|
||||
class { "abusehelper::init":
|
||||
botnets => $abusehelper_botnets,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -134,15 +136,7 @@ class abusehelper {
|
|||
|
||||
# Install abusehelper init script.
|
||||
#
|
||||
class abusehelper::init {
|
||||
|
||||
if !$abusehelper_botnets {
|
||||
fail("Must define \$abusehelper_botnets")
|
||||
}
|
||||
|
||||
if !$abusehelper_user {
|
||||
$abusehelper_user = "abusehel"
|
||||
}
|
||||
class abusehelper::init($botnets, $user="abusehel") {
|
||||
|
||||
file { "/etc/sysconfig/botnet":
|
||||
ensure => present,
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
BOTUSER="<%= @abusehelper_user %>"
|
||||
BOTNETS="<%= @abusehelper_botnets.join(" ") %>"
|
||||
BOTUSER="<%= @user %>"
|
||||
BOTNETS="<%= @botnets.join(" ") %>"
|
||||
|
|
|
@ -89,9 +89,10 @@ class abusesa {
|
|||
python::setup::install { "/usr/local/src/abusesa": }
|
||||
|
||||
if $abusesa_botnets {
|
||||
$abusehelper_botnets = $abusesa_botnets
|
||||
$abusehelper_user = "abusesa"
|
||||
include abusehelper::init
|
||||
class { "abusehelper::init":
|
||||
botnets => $abusesa_botnets,
|
||||
user => "abusesa",
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue