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 {
|
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,
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
BOTUSER="<%= @abusehelper_user %>"
|
BOTUSER="<%= @user %>"
|
||||||
BOTNETS="<%= @abusehelper_botnets.join(" ") %>"
|
BOTNETS="<%= @botnets.join(" ") %>"
|
||||||
|
|
|
@ -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",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue