X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fnagios%2Fmanifests%2Fclient.pp;h=d86b39c4805b51fb5bb1c8d852b964496e45a80e;hb=84ae359a4dd89da06aa33e2e75d62476d7b6ea82;hp=710378c5a963b5f4d34c6fd952b00b68bd9c0c91;hpb=06636b29ab22582ac3a830674a51a4e5e641858d;p=mirror%2Fdsa-puppet.git diff --git a/modules/nagios/manifests/client.pp b/modules/nagios/manifests/client.pp index 710378c5a..d86b39c48 100644 --- a/modules/nagios/manifests/client.pp +++ b/modules/nagios/manifests/client.pp @@ -13,17 +13,7 @@ class nagios::client inherits nagios { pattern => 'nrpe', } - ferm::rule { 'dsa-nagios-v4': - description => 'Allow nrpe from nagios master', - rule => 'proto tcp mod state state (NEW) dport (5666) @subchain \'nagios\' { saddr ($HOST_NAGIOS_V4) ACCEPT; }', - notarule => true, - } - ferm::rule { 'dsa-nagios-v6': - description => 'Allow nrpe from nagios master', - domain => 'ip6', - rule => 'proto tcp mod state state (NEW) dport (5666) @subchain \'nagios\' { saddr ($HOST_NAGIOS_V6) ACCEPT; }', - notarule => true, - } + Ferm::Rule::Simple <<| tag == 'nagios-nrpe::server' |>> file { '/etc/default/nagios-nrpe-server': source => 'puppet:///modules/nagios/common/default', @@ -51,10 +41,19 @@ class nagios::client inherits nagios { source => 'puppet:///files/empty/', notify => Service['nagios-nrpe-server'], } - file { '/etc/nagios/nrpe.d/debianorg.cfg': + + concat { '/etc/nagios/nrpe.d/debianorg.cfg': + ensure_newline => true, + warn => '# This file is maintained with puppet', + notify => Service['nagios-nrpe-server'], + mode => '0444', + } + concat::fragment { 'nrpe-debian-staticchecks': + target => '/etc/nagios/nrpe.d/debianorg.cfg', content => template('nagios/inc-debian.org.erb'), - notify => Service['nagios-nrpe-server'], } + Concat::Fragment <<| tag == 'nagios-nrpe::server::debianorg.cfg' |>> + file { '/etc/nagios/nrpe.d/nrpe_dsa.cfg': source => 'puppet:///modules/nagios/dsa-nagios/generated/nrpe_dsa.cfg', notify => Service['nagios-nrpe-server'],