## confdroid_nagios::nagios::resources::resource.pp # Module name: confdroid_nagios # Author: 12ww1160 (12ww1160@confdroid.com) # @summary Class manages the resource config file header. # @example concat::fragment { "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", # } ############################################################################# class confdroid_nagios::nagios::resources::resource ( ) inherits confdroid_nagios::params { if $fqdn == $ng_nagios_server { concat { $ng_resource_file: ensure => present, owner => 'root', group => 'nagios', 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', } } }