## cd_nagios::server::access.pp # Module name: cd_nagios # Author: Arne Teuke (arne_teuke@ConfDroid.com) # # License: # This file is part of cd_nagios. # # cd_nagios is used for providing automatic configuration of Nagios # Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # @summary Define manages user- and password rules for accessing nagios. # @param [string] ng_htpasswd_user user name for the /etc/nagios/passwd file # @param [string] ng_htpasswd_password the encrypted password for the # /etc/nagios/passwd file. ############################################################################## define cd_nagios::server::access ( $ng_htpasswd_user = undef, $ng_htpasswd_password = undef, ) { $ng_nagios_server = $::cd_nagios::params::ng_nagios_server $ng_htpasswd_file = $::cd_nagios::params::ng_htpasswd_file $ng_htpasswd_rule = $::cd_nagios::params::ng_htpasswd_rule $ng_service = $::cd_nagios::params::ng_service if $::fqdn == $ng_nagios_server { # create password rules concat::fragment { $name: target => $ng_htpasswd_file, content => template($ng_htpasswd_rule), } } }