Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/352269 )
Change subject: nagios_common: test contact template with private/hiera lookup ...................................................................... nagios_common: test contact template with private/hiera lookup After introducing a structure for the secret parts of contact data in private/hieradata this is the next step towards moving contacts.cfg from private to public repo. Adding a temp contacts-new file with some test data that lives next to the real contacts file while leaving them completely untouched. Change-Id: I40da8afe0c78c8f96de0773a5e84dbebb22d191a --- M modules/nagios_common/manifests/contacts.pp A modules/nagios_common/templates/contacts-new.cfg.erb 2 files changed, 50 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/nagios_common/manifests/contacts.pp b/modules/nagios_common/manifests/contacts.pp index 9e2acb5..be4a235 100644 --- a/modules/nagios_common/manifests/contacts.pp +++ b/modules/nagios_common/manifests/contacts.pp @@ -59,5 +59,15 @@ group => $group, mode => '0600', # Only $owner:$group can read/write } + + # 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', + } } } diff --git a/modules/nagios_common/templates/contacts-new.cfg.erb b/modules/nagios_common/templates/contacts-new.cfg.erb new file mode 100644 index 0000000..006a765 --- /dev/null +++ b/modules/nagios_common/templates/contacts-new.cfg.erb @@ -0,0 +1,40 @@ +# vim: autoindent ts=8 + +define contact{ + contact_name irc + alias wikimedia-tech + host_notification_period 24x7 + service_notification_period 24x7 + host_notification_options d,r,f + service_notification_options c,r,f + email nowhere + host_notification_commands notify-host-by-irc + service_notification_commands notify-service-by-irc +} + +define contact{ + contact_name irc-wikidata + alias wikidata-irc-bot + host_notification_period 24x7 + service_notification_period 24x7 + host_notification_options d,r,f + service_notification_options c,r,f + email nowhere + host_notification_commands notify-host-by-irc-wikidata + service_notification_commands notify-service-by-irc-wikidata +} + +define contact{ + contact_name dzahn + alias daniel_zahn + host_notification_period PST_awake_hours + 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']) %> + 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/352269 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40da8afe0c78c8f96de0773a5e84dbebb22d191a Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn <dz...@wikimedia.org> Gerrit-Reviewer: Dzahn <dz...@wikimedia.org> Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits