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
|
# File 'manifests/service/user.pp', line 23
class gitea::service::user (
Boolean $manage_user = $gitea::manage_user,
Boolean $manage_group = $gitea::manage_group,
Boolean $manage_home = $gitea::manage_home,
String $user = $gitea::owner,
String $group = $gitea::group,
Optional[String] $home = $gitea::home,
) {
$homedir = ($home =~ Undef) ? {
true => "/home/${user}",
false => $home,
}
if ($manage_group) {
group { $group:
ensure => present,
system => true,
}
}
if ($manage_user) {
user { $user:
ensure => present,
gid => $group,
home => $homedir,
managehome => $manage_home,
system => true,
require => Group[$group],
notify => Systemd::Tmpfile['gitea.conf'],
}
}
}
|