# define a service object define glauth::obj::service ( String $service_name, String $mail, Integer $uidnumber, Integer $primarygroup, String $passsha256, Stdlib::Absolutepath $config_path, Optional[Array[Integer]] $othergroups = [], ) { $formatted_othergroups = $othergroups.empty ? { true => '[]', false => "[${othergroups.join(', ')}]", } concat::fragment { "glauth_service_${service_name}": target => $config_path, content => epp('glauth/obj/service.epp', { 'name' => $service_name, 'mail' => $mail, 'uidnumber' => $uidnumber, 'primarygroup' => $primarygroup, 'passsha256' => $passsha256, 'othergroups' => $formatted_othergroups, }), order => '80', } }