feat: create glauth module
- manage config directories, config file - manage systemd service and socket - manage users, service accounts and groups - manage defaults for users, services and groups - manage packages for role
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# manage the glauth service/socket
|
||||
class glauth::service (
|
||||
$service_enable = $glauth::service_enable,
|
||||
$service_name = $glauth::service_name,
|
||||
$user = $glauth::user,
|
||||
$group = $glauth::group,
|
||||
$config_path = $glauth::config_path,
|
||||
$bin_path = $glauth::bin_path,
|
||||
$ldap_port = $glauth::ldap_port,
|
||||
$ldaps_port = $glauth::ldaps_port,
|
||||
$api_port = $glauth::api_port,
|
||||
){
|
||||
if $service_enable {
|
||||
include ::systemd
|
||||
|
||||
systemd::unit_file { "${service_name}.service":
|
||||
content => epp('glauth/systemd.service.epp', {
|
||||
'bin_path' => $bin_path,
|
||||
'config_path' => $config_path,
|
||||
'user' => $user,
|
||||
'group' => $group,
|
||||
'service_name' => $service_name,
|
||||
}),
|
||||
enable => true,
|
||||
active => true,
|
||||
subscribe => Concat[$config_path],
|
||||
# should also subscribe to tls certs
|
||||
}
|
||||
#systemd::unit_file { "${service_name}.socket":
|
||||
# content => epp('glauth/systemd.socket.epp', {
|
||||
# 'ldap_port' => $ldap_port,
|
||||
# 'ldaps_port' => $ldaps_port,
|
||||
# 'api_port' => $api_port,
|
||||
#}),
|
||||
# enable => true,
|
||||
# active => true,
|
||||
# subscribe => Concat[$config_path],
|
||||
#}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user