feat: add othergroups support for services
- extend glauth::obj::service to allow othergroups
This commit is contained in:
parent
3dc8fb03fa
commit
95a0b543fd
@ -6,7 +6,12 @@ define glauth::obj::service (
|
|||||||
Integer $primarygroup,
|
Integer $primarygroup,
|
||||||
String $passsha256,
|
String $passsha256,
|
||||||
Stdlib::Absolutepath $config_path,
|
Stdlib::Absolutepath $config_path,
|
||||||
|
Optional[Array[Integer]] $othergroups = [],
|
||||||
) {
|
) {
|
||||||
|
$formatted_othergroups = $othergroups.empty ? {
|
||||||
|
true => '[]',
|
||||||
|
false => "[${othergroups.join(', ')}]",
|
||||||
|
}
|
||||||
concat::fragment { "glauth_service_${service_name}":
|
concat::fragment { "glauth_service_${service_name}":
|
||||||
target => $config_path,
|
target => $config_path,
|
||||||
content => epp('glauth/obj/service.epp', {
|
content => epp('glauth/obj/service.epp', {
|
||||||
@ -15,6 +20,7 @@ define glauth::obj::service (
|
|||||||
'uidnumber' => $uidnumber,
|
'uidnumber' => $uidnumber,
|
||||||
'primarygroup' => $primarygroup,
|
'primarygroup' => $primarygroup,
|
||||||
'passsha256' => $passsha256,
|
'passsha256' => $passsha256,
|
||||||
|
'othergroups' => $formatted_othergroups,
|
||||||
}),
|
}),
|
||||||
order => '80',
|
order => '80',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,4 +4,5 @@
|
|||||||
uidnumber = <%= $uidnumber %>
|
uidnumber = <%= $uidnumber %>
|
||||||
primarygroup = <%= $primarygroup %>
|
primarygroup = <%= $primarygroup %>
|
||||||
passsha256 = "<%= $passsha256 %>"
|
passsha256 = "<%= $passsha256 %>"
|
||||||
|
othergroups = <%= $othergroups %>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user