diff --git a/doc/puppet_classes/confdroid_nagios_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/confdroid_nagios_3A_3Amain_3A_3Aconfig.html
index 1f7d3c9..8597b86 100644
--- a/doc/puppet_classes/confdroid_nagios_3A_3Amain_3A_3Aconfig.html
+++ b/doc/puppet_classes/confdroid_nagios_3A_3Amain_3A_3Aconfig.html
@@ -106,7 +106,11 @@
8
9
10
-11
+11
+12
+13
+14
+15
# File 'manifests/main/config.pp', line 6
@@ -114,7 +118,11 @@
class confdroid_nagios::main::config (
) inherits confdroid_nagios::params {
- include confdroid_nagios::server::service
+ if $fqdn == $ng_nagios_server {
+ include confdroid_nagios::server::service
+ include confdroid_nagios::nagios::resources::resource
+ }
+
include confdroid_nagios::client::target
}
diff --git a/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource.html b/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource.html
new file mode 100644
index 0000000..025ae25
--- /dev/null
+++ b/doc/puppet_classes/confdroid_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource.html
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+ Puppet Class: confdroid_nagios::nagios::resources::resource
+
+ — Documentation by YARD 0.9.36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Puppet Class: confdroid_nagios::nagios::resources::resource
+
+
+
Summary
+ Class manages the resource config file header.
+
+
Overview
+
+
+
+
confdroid_nagios::nagios::resources::resource.pp Module name: confdroid_nagios Author: 12ww1160 (12ww1160@confdroid.com) }
+
+
+
+
+
+
+
+
+
+
+
+
+
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+
+
+ # File 'manifests/nagios/resources/resource.pp', line 11
+
+class confdroid_nagios::nagios::resources::resource (
+
+) inherits confdroid_nagios::params {
+ if $fqdn == $ng_nagios_server {
+ concat { $ng_resource_file:
+ ensure => present,
+ owner => 'root',
+ group => $ng_user,
+ mode => '0640',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_etc_t,
+ seluser => system_u,
+ notify => Service[$ng_service],
+ }
+
+ concat::fragment { 'header':
+ target => $ng_resource_file,
+ content => template($ng_resource_erb),
+ order => '000',
+ }
+
+ # plugins rule
+
+ confdroid_nagios::nagios::resources::resource_df { 'user_rule_plugins':
+ ng_user_arg_name => 'USER1',
+ ng_user_arg_value => '/usr/lib64/nagios/plugins/',
+ ng_user_arg_comment => 'Sets user1 to be the path to the plugins',
+ }
+
+ # eventhandlers rule
+ confdroid_nagios::nagios::resources::resource_df { 'user_rule_eventhandlers':
+ ng_user_arg_name => 'USER2',
+ ng_user_arg_value => '/usr/lib64/nagios/plugins/eventhandlers/',
+ ng_user_arg_comment => 'Sets user2 to be the path to the eventhandlers',
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/puppet_classes/confdroid_nagios_3A_3Aparams.html b/doc/puppet_classes/confdroid_nagios_3A_3Aparams.html
index a6dd74d..3ea5a4c 100644
--- a/doc/puppet_classes/confdroid_nagios_3A_3Aparams.html
+++ b/doc/puppet_classes/confdroid_nagios_3A_3Aparams.html
@@ -83,6 +83,8 @@
confdroid_nagios::server::access_rules
+ confdroid_nagios::nagios::resources::resource
+
@@ -417,7 +419,8 @@ inherited by all classes except defines.
141
142
143
-144
+144
+145
# File 'manifests/params.pp', line 31
@@ -507,6 +510,8 @@ class confdroid_nagios::params (
$ng_htpasswd_file = "${ng_main_dir}/passwd"
$ng_htpasswd_head = 'confdroid_nagios/nagios/htpasswd_head.erb'
$ng_htpasswd_rule = 'confdroid_nagios/nagios/htpasswd_rule.erb'
+ $ng_resource_file = '/etc/nagios/private/resource.cfg'
+ $ng_resource_erb = 'confdroid_nagios/nagios/resource_cfg.erb'
## old
$ng_main_config = "${ng_main_dir}/nagios.cfg"
@@ -530,7 +535,6 @@ class confdroid_nagios::params (
$ng_index_html_erb = 'confdroid_nagios/httpd/index_html.erb'
$ng_ssl_vhost_file = '/etc/httpd/conf.d/nagios_ssl.conf'
$ng_ssl_vhost_erb = 'confdroid_nagios/httpd/nagios_ssl_vhost.erb'
- $ng_resource_erb = 'confdroid_nagios/nagios/resource_cfg.erb'
$ng_grep_erb = 'confdroid_nagios/selinux/grep.erb'
# includes must be last
diff --git a/doc/puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Aservice.html
index 8dac6fb..92da8db 100644
--- a/doc/puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Aservice.html
+++ b/doc/puppet_classes/confdroid_nagios_3A_3Aserver_3A_3Aservice.html
@@ -122,7 +122,8 @@
24
25
26
-27
+27
+28
# File 'manifests/server/service.pp', line 6
@@ -133,6 +134,7 @@ class confdroid_nagios::server::service (
require confdroid_nagios::server::files
if $ng_nagios_server == $fqdn {
require confdroid_nagios::server::access_rules
+
exec { 'restart_httpd':
command => 'systemctl restart httpd',
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
diff --git a/doc/puppet_defined_type_list.html b/doc/puppet_defined_type_list.html
index cffa239..8310ff9 100644
--- a/doc/puppet_defined_type_list.html
+++ b/doc/puppet_defined_type_list.html
@@ -40,7 +40,14 @@
-
+
+
+
+
+
+
diff --git a/doc/puppet_defined_types/confdroid_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource_df.html b/doc/puppet_defined_types/confdroid_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource_df.html
new file mode 100644
index 0000000..14cb31c
--- /dev/null
+++ b/doc/puppet_defined_types/confdroid_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource_df.html
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+ Defined Type: confdroid_nagios::nagios::resources::resource_df
+
+ — Documentation by YARD 0.9.36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Defined Type: confdroid_nagios::nagios::resources::resource_df
+
+
+ Defined in:
+
+ manifests/nagios/resources/resource_df.pp
+
+
+
+
+
Summary
+ define manages the resources in/etc/nagios/private/resources.cfg
+
+
Overview
+
+
+
+
confdroid_nagios::nagios::resources::resource_df.pp Module name: confdroid_nagios Author: 12ww1160 (12ww1160@ConfDroid.com)
+
+
+
+
+
+
+
+
+
+
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
+
+ # File 'manifests/nagios/resources/resource_df.pp', line 10
+
+define confdroid_nagios::nagios::resources::resource_df (
+
+ Optional[String] $ng_user_arg_name = undef,
+ Optional[String] $ng_user_arg_value = undef,
+ Optional[String] $ng_user_arg_comment = undef,
+ String $ng_resource_rule_erb = 'confdroid_nagios/nagios/resource_cfg_rule.erb',
+
+) {
+ $ng_nagios_server = $confdroid_nagios::params::ng_nagios_server
+ $ng_resource_file = $confdroid_nagios::params::ng_resource_file
+
+ if $fqdn == $ng_nagios_server {
+ concat::fragment { "rule_${name}":
+ target => $ng_resource_file,
+ content => template($ng_resource_rule_erb),
+ order => '000',
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/puppet_defined_types/confdroid_nagios_3A_3Aserver_3A_3Aaccess.html b/doc/puppet_defined_types/confdroid_nagios_3A_3Aserver_3A_3Aaccess.html
index 5a1508a..77d34be 100644
--- a/doc/puppet_defined_types/confdroid_nagios_3A_3Aserver_3A_3Aaccess.html
+++ b/doc/puppet_defined_types/confdroid_nagios_3A_3Aserver_3A_3Aaccess.html
@@ -161,8 +161,7 @@
26
27
28
-29
-30
+29
# File 'manifests/server/access.pp', line 13
@@ -178,7 +177,6 @@ define confdroid_nagios::server::access (
if $fqdn == $ng_nagios_server {
# create password rules
-
concat::fragment { $name:
target => $ng_htpasswd_file,
content => template($ng_htpasswd_rule),