Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391980 )
Change subject: icinga: test creating individual contact secrets ...................................................................... icinga: test creating individual contact secrets Change-Id: If8f40bd63d5b5aa3d73ad4a75b6125fd0f28814e --- M modules/nagios_common/manifests/contacts.pp M modules/nagios_common/templates/contacts-new.cfg.erb 2 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/391980/1 diff --git a/modules/nagios_common/manifests/contacts.pp b/modules/nagios_common/manifests/contacts.pp index a767645..9c00228 100644 --- a/modules/nagios_common/manifests/contacts.pp +++ b/modules/nagios_common/manifests/contacts.pp @@ -62,14 +62,15 @@ show_diff => false, } + $contacts = hiera('icinga_contact_secrets') # This 'new' file exists only temp during careful transition of contacts # from private repo and is not actually included by Icinga. --dz 20170505 - #file { "${config_dir}/contacts-new.cfg": - # ensure => $ensure, - # content => template('nagios_common/contacts-new.cfg.erb'), - # owner => $owner, - # group => $group, - # mode => '0400', - #} + file { "${config_dir}/contacts-new.cfg": + ensure => $ensure, + content => template('nagios_common/contacts-new.cfg.erb'), + owner => $owner, + group => $group, + mode => '0400', + } } } diff --git a/modules/nagios_common/templates/contacts-new.cfg.erb b/modules/nagios_common/templates/contacts-new.cfg.erb index 9da04d9..89a3754 100644 --- a/modules/nagios_common/templates/contacts-new.cfg.erb +++ b/modules/nagios_common/templates/contacts-new.cfg.erb @@ -24,7 +24,6 @@ service_notification_commands notify-service-by-irc-wikidata } -<%- contact = 'dzahn' -%> define contact{ contact_name dzahn alias daniel_zahn @@ -32,9 +31,9 @@ service_notification_period PST_awake_hours host_notification_options d,r,f service_notification_options c,r,f - email <%= scope.function_hiera(['icinga::contacts::dzahn::email']) %> - pager <%= scope.function_hiera(['icinga::contacts::dzahn::pager']) %> - address1 <%= scope.function_hiera(['icinga::contacts::dzahn::address1']) %> + email <%= contacts['dzahn']['email'] %> + pager <%= contacts['dzahn']['pager'] %> + address1 <%= contacts['dzahn']['address1'] %> host_notification_commands host-notify-by-email,host-notify-by-sms-gateway service_notification_commands notify-by-email,notify-by-sms-gateway } @@ -46,10 +45,10 @@ service_notification_period 24x7 host_notification_options d,r,f service_notification_options c,r,f - email <%= scope.function_hiera(['icinga::contacts::bblack::email']) %> - pager <%= scope.function_hiera(['icinga::contacts::bblack::pager']) %> - address1 <%= scope.function_hiera(['icinga::contacts::bblack::address1']) %> - host_notification_commands host-notify-by-email,host-notify-by-sms-gateway + email <%= contacts['bblack']['email'] %> + pager <%= contacts['bblack']['pager'] %> + address1 <%= contacts['bblack']['address1'] %> + host_notification_commands host-notify-by-email,host-notify-by-sms-gateway service_notification_commands notify-by-email,notify-by-sms-gateway } -- To view, visit https://gerrit.wikimedia.org/r/391980 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8f40bd63d5b5aa3d73ad4a75b6125fd0f28814e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn <dz...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits