## cd_nagios::nagios::objects::add_contactgroups.pp # Module name: cd_nagios # Author: Arne Teuke (arne_teuke@ConfDroid.com) # @summary Define populates /etc/nagios/conf.d/nagios_add_contactgroups through # external puppet rules. # @param [string] ng_contactgroup_name Specify the short name of the # contact group. # @param [string] ng_contactgroup_alias Specify the alias (long name) of the # contact group # @param [string] ng_contactgroup_register Specify whether the contact group # should be registered in Nagios. ################################################################################ define cd_nagios::nagios::objects::add_contactgroups ( Optional[String] $ng_contactgroup_name = undef, Optional[String] $ng_contactgroup_alias = undef, String $ng_contactgroup_register = '1', ) { $ng_nagios_server = $cd_nagios::params::ng_nagios_server $ng_tgt_contactgroup_add = $cd_nagios::params::ng_tgt_contactgroup_add $ng_cntctgrps_rule_erb = $cd_nagios::params::ng_cntctgrps_rule_erb if $::fqdn == $ng_nagios_server { concat::fragment { $name: target => $ng_tgt_contactgroup_add, content => template($ng_cntctgrps_rule_erb), } } }