Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/nagios/manifests/server.pp

Issue 5114072680890368: Issue 2188 - Use class parameter lookup feature with Hiera (Closed)
Patch Set: Created March 20, 2015, 1:42 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « hiera/roles/monitoringserver.yaml ('k') | modules/private-stub/hiera/roles/monitoringserver.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/nagios/manifests/server.pp
===================================================================
--- a/modules/nagios/manifests/server.pp
+++ b/modules/nagios/manifests/server.pp
@@ -6,6 +6,12 @@
$htpasswd_source,
$admins,
$zone,
+ $contacts = hiera('nagios::server::contacts', {}),
+ $contactgroups = hiera('nagios::server::contactgroups', {}),
+ $commands = hiera('nagios::server::commands', {}),
+ $services = hiera('nagios::server::services', {}),
+ $hosts = hiera('nagios::server::hosts', {}),
+ $hostgroups = hiera('nagios::server::hostgroups', {}),
) {
File {
@@ -147,23 +153,12 @@
notify => Service['nagios3']
}
- $nagios_contacts = hiera('nagios_contacts', {})
- create_resources(nagios_contact, $nagios_contacts)
-
- $nagios_contactgroups = hiera('nagios_contactgroups', {})
- create_resources(nagios_contactgroup, $nagios_contactgroups)
-
- $nagios_commands = hiera('nagios_commands', {})
- create_resources(nagios_command, $nagios_commands)
-
- $nagios_services = hiera('nagios_services', {})
- create_resources(nagios_service, $nagios_services)
-
- $nagios_hosts = hiera('nagios_hosts', {})
- create_resources(nagios_host, $nagios_hosts)
-
- $nagios_hostgroups = hiera('nagios_hostgroups', {})
- create_resources(nagios_hostgroup, $nagios_hostgroups)
+ create_resources(nagios_contact, $contacts)
+ create_resources(nagios_contactgroup, $contactgroups)
+ create_resources(nagios_command, $commands)
+ create_resources(nagios_service, $services)
+ create_resources(nagios_host, $hosts)
+ create_resources(nagios_hostgroup, $hostgroups)
$nagios_generic = hiera('servers')
create_resources(nagios::server::generic_host, $nagios_generic)
« no previous file with comments | « hiera/roles/monitoringserver.yaml ('k') | modules/private-stub/hiera/roles/monitoringserver.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld