30 lines
1.2 KiB
Puppet
30 lines
1.2 KiB
Puppet
## confdroid_nagios::nagios::resources::resource_df.pp
|
|
# Module name: confdroid_nagios
|
|
# Author: 12ww1160 (12ww1160@ConfDroid.com)
|
|
# @summary define manages the resources in/etc/nagios/private/resources.cfg
|
|
# @param [String] ng_user_arg_name the name of user argument i.e. $user1$
|
|
# @param [String] ng_user_arg_value the value of t user argument i.e. $user1$
|
|
# @param [String] ng_user_arg_comment the argument i.e. $user1$
|
|
# @param [String] ng_resource_rule_erb resource rule #
|
|
#############################################################################
|
|
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
|
|
$fqdn = $facts['networking']['fqdn']
|
|
|
|
if $fqdn == $ng_nagios_server {
|
|
concat::fragment { "rule_${name}":
|
|
target => $ng_resource_file,
|
|
content => template($ng_resource_rule_erb),
|
|
order => '000',
|
|
}
|
|
}
|
|
}
|