Files
confdroid_nagios/manifests/main/user.pp
2017-07-30 14:56:40 +01:00

54 lines
1.8 KiB
Puppet

## cd_nagios::main::user.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 <http://www.gnu.org/licenses/>.
# @summary Class manages service users for cd_nagios.
#############################################################################
class cd_nagios::main::user (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::main::install
}
group { $ng_user:
ensure => present,
name => $ng_user,
gid => $ng_u_uid,
allowdupe => false,
}
user { $ng_user:
ensure => present,
name => $ng_user,
allowdupe => false,
comment => $ng_u_comment,
uid => $ng_u_uid,
gid => $ng_user,
groups => $ng_u_groups,
managehome => true,
home => $ng_user_home,
shell => $ng_user_shell,
require => Group[$ng_user],
}
}
}