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
|
class users::virtual inherits user {
# define custom users here
# groups
#group { [ "group1", "group2" ]:
# ensure => present,
#}
#user::manage { "":
# tag => "virtual",
# password => '',
# comment => 'user@host.com',
# groups => [ 'group1' ],
# sshkey => absent,
#}
}
class users::backup inherits user {
# define third-party hosted backup users here
}
class users::email inherits user {
# define third-party hosted email tunnels here
#user::manage { "mailuser":
# password => '*',
# groups => [ "group2" ],
# sshkey => "",
# sshkey_type => "ssh-rsa",
# homedir => '',
#}
}
class users::admin inherits user {
# reprepro group needed for web nodes
if !defined(Group["reprepro"]) {
group { "reprepro":
ensure => present,
}
}
# senha escangalhada para o root
user::manage { "root":
tag => "admin",
homedir => '/root',
password => '$6$rwKJZHuG1D6v82So$oP60nSPInB408TKQjObBVN5LZyCxcPECz5SfboBnwrVLJOrbSMkd0vUjqqEZHKiBdhyETW/qpbFAer8a4XGFS.',
}
# TODO: temporary cleanup; remove after all nodes have applied it
file { '/home/root':
ensure => absent,
recurse => true,
force => true,
}
#user::manage { "user1":
# tag => "admin",
# groups => [ "sudo", "reprepro", "backupninjas" ],
# password => '$5$96ewxsYOOi7XbhDV$hDOleZ1B2A6dUc1ukDHhx4dmYhyAWvqYAf1xczAHmI8',
# sshkey => "",
#}
}
|