From 9e753a6914968a9fc556ee77a2c8da763a4b159d Mon Sep 17 00:00:00 2001 From: 12ww1160 <12ww1160@confdroid.com> Date: Sun, 1 Mar 2026 14:21:30 +0100 Subject: [PATCH] OP#436 testing --- README.md | 5 +++++ manifests/nagios/objects/commands.pp | 2 +- manifests/server/access_rules.pp | 2 +- manifests/server/service.pp | 4 ++-- templates/nagios/nagios_cfg.erb | 1 - 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6e33fa6..5d0bfd1 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,11 @@ See the full Puppet documentation including parameters in `docs/index.html` All dependencies must be included in the catalogue. +- `puppetlabs-firewall` +- `puppetlabs-stdlib` +- `puppetlabs-concat` +- `puppetlabs-nagios_core` + ## Deployment - native Puppet deployment diff --git a/manifests/nagios/objects/commands.pp b/manifests/nagios/objects/commands.pp index a8d4bf9..1fd5770 100644 --- a/manifests/nagios/objects/commands.pp +++ b/manifests/nagios/objects/commands.pp @@ -13,7 +13,7 @@ class confdroid_nagios::nagios::objects::commands ( ensure => present, command_name => 'notify-host-by-email', command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **" $CONTACTEMAIL$', - owner => 'nagios', + owner => 'nagions', group => 'nagios', mode => '0640', target => $ng_target_command, diff --git a/manifests/server/access_rules.pp b/manifests/server/access_rules.pp index 5b21c3c..525173f 100644 --- a/manifests/server/access_rules.pp +++ b/manifests/server/access_rules.pp @@ -19,7 +19,7 @@ class confdroid_nagios::server::access_rules ( selrole => object_r, seltype => nagios_etc_t, seluser => system_u, - notify => Exec['restart_httpd'], + notify => Exec['ng_restart_httpd'], } # manage file header diff --git a/manifests/server/service.pp b/manifests/server/service.pp index ddfc561..2a241da 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -12,7 +12,7 @@ class confdroid_nagios::server::service ( require confdroid_nagios::nagios::resources::resource require confdroid_nagios::nagios::objects::commands - exec { 'restart_httpd': + exec { 'ng_restart_httpd': command => 'systemctl restart httpd', path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'], refreshonly => true, @@ -24,7 +24,7 @@ class confdroid_nagios::server::service ( enable => true, hasrestart => true, hasstatus => true, - require => Exec['restart_httpd'], + require => Exec['ng_restart_httpd'], } } } diff --git a/templates/nagios/nagios_cfg.erb b/templates/nagios/nagios_cfg.erb index e57dcd7..9bf8315 100644 --- a/templates/nagios/nagios_cfg.erb +++ b/templates/nagios/nagios_cfg.erb @@ -14,7 +14,6 @@ log_file=<%= @ng_log_file %> # Original files are available at https://3for.me/hn6ca (membership area) # or at nagios.org -# You can specify individual object config files as shown below: cfg_file=/etc/nagios/objects/commands.cfg cfg_file=/etc/nagios/objects/contacts.cfg cfg_file=/etc/nagios/objects/timeperiods.cfg