-
Notifications
You must be signed in to change notification settings - Fork 3
/
params.pp
106 lines (89 loc) · 3.41 KB
/
params.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File:: <tt>params.pp</tt>
# Author:: UL HPC Team aka. S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl (hpc-sysadmins@uni.lu)
# Copyright:: Copyright (c) 2015 UL HPC Team aka. S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl
# License:: Gpl-3.0
#
# ------------------------------------------------------------------------------
# = Class: sysadmins::params
#
# In this class are defined as variables values that are used in other sysadmins classes.
# This class should be included, where necessary, and eventually be enhanced with support
# for more OS
#
# == Warnings
#
# /!\ Always respect the style guide available
# here[http://docs.puppetlabs.com/guides/style_guide]
#
# The usage of a dedicated param classe is advised to better deal with
# parametrized classes, see
# http://docs.puppetlabs.com/guides/parameterized_classes.html
#
# [Remember: No empty lines between comments and class definition]
#
class sysadmins::params {
######## DEFAULTS FOR VARIABLES USERS CAN SET ##########################
# (Here are set the defaults, provide your custom variables externally)
# (The default used is in the line with '')
###########################################
# ensure the presence (or absence) of sysadmins
$ensure = 'present'
# the actual login used for the local sysadmin account
$login = 'localadmin'
# redirect all mails sent to the sysadmin account to this email address
# if no email is defined ('' string) will send email individually to all admins
$email = ''
# whether to purge the authorized_keys files or not
$purge_ssh_keys = true
# whether or not to prevent access to the sysadmin account for non-registered users
# (via ~<login>/.sysadminrc)
$filter_access = true
# Sets the lowest uid (resp. gid) for non system users (resp. groups).
# This is a system setting and also affects users (resp. groups) created outside of this module.
$start_uid = undef
$start_gid = undef
# Manage the homedir
$managehome = true
# Set the resource "user" parameter so that the users are not created/supressed
# in external user directories (i.e. LDAP).
$forcelocal = true
# Hash of the users authorized to connect to the local sysadmin account
# i.e. the real users (system administrators).
$users = {}
# Additonnal groups the sysadmin user is member of
$groups = [ ]
# Hash of the SSH keys.
$ssh_keys = {}
#### MODULE INTERNAL VARIABLES #########
# (Modify to adapt to unsupported OSes)
#######################################
$homebasedir = $facts['os']['family'] ? {
'Redhat' => '/home', # Simpler to handle SELinux on Redhat-like systems
default => '/var/lib'
}
$base_groups = $facts['os']['family'] ? {
'Redhat' => [ 'wheel'],
'Debian' => [ 'adm' ],
default => []
}
# $extra_packages = $::operatingsystem ? {
# /(?i-mx:ubuntu|debian)/ => [],
# /(?i-mx:centos|fedora|redhat)/ => [],
# default => []
# }
$configdir_mode = $facts['os']['name'] ? {
default => '0700',
}
# $configdir_owner = $::operatingsystem ? {
# default => 'root',
# }
# $configdir_group = $::operatingsystem ? {
# default => 'root',
# }
$configfile = $facts['os']['name'] ? {
default => '.sysadminrc',
}
$configfile_mode = $facts['os']['name'] ? {
default => '0644',
}
}