Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
testing
puppet-icinga2_testing
Commits
a3fd9097
Commit
a3fd9097
authored
Oct 06, 2016
by
Markus Frosch
Browse files
selftest: Move commands to global zone (needs global zone from hiera)
parent
24e9e49a
Changes
1
Hide whitespace changes
Inline
Side-by-side
manifests/profiles/selftest.pp
View file @
a3fd9097
...
...
@@ -12,10 +12,13 @@ class icinga2_testing::profiles::selftest(
notify
=>
Class
[
'::icinga2::service'
],
}
$zone_dir
=
"/etc/icinga2/zones.d/
${zone}
"
$zones_d
=
'/etc/icinga2/zones.d'
$zone_dir
=
"
${zones_d}
/
${zone}
"
$global_zone
=
"
${zones_d}
/global"
$config_base
=
"
${zone_dir}
/selftest"
ensure_resource
(
file
,
$zone_dir
,
{
ensure
=>
directory
})
ensure_resource
(
file
,
$global_zone
,
{
ensure
=>
directory
})
$_zones
=
hiera_hash
(
'icinga2::object::zone'
)
...
...
@@ -28,14 +31,19 @@ class icinga2_testing::profiles::selftest(
"
${config_base}
/templates.conf"
:
ensure
=>
file
,
content
=>
template
(
'icinga2_testing/selftest/templates.conf.erb'
);
"
${config_base}
/commands.conf"
:
ensure
=>
file
,
content
=>
template
(
'icinga2_testing/selftest/commands.conf.erb'
);
"
${config_base}
/hosts.conf"
:
ensure
=>
file
,
content
=>
template
(
'icinga2_testing/selftest/hosts.conf.erb'
);
"
${config_base}
/services.conf"
:
ensure
=>
file
,
content
=>
template
(
'icinga2_testing/selftest/services.conf.erb'
);
"
${global_zone}
/selftest"
:
ensure
=>
directory
,
force
=>
true
,
purge
=>
true
,
recurse
=>
true
;
"
${global_zone}
/selftest/commands.conf"
:
ensure
=>
file
,
content
=>
template
(
'icinga2_testing/selftest/commands.conf.erb'
);
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment