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,45 @@
|
||||
# install the glauth directories and binary
|
||||
class glauth::install (
|
||||
String $user = $glauth::user,
|
||||
String $group = $glauth::group,
|
||||
Stdlib::Absolutepath $bin_dir = $glauth::bin_dir,
|
||||
Stdlib::Absolutepath $bin_path = $glauth::bin_path,
|
||||
Stdlib::Absolutepath $config_dir = $glauth::config_path,
|
||||
Stdlib::Absolutepath $config_path = $glauth::config_path,
|
||||
String $download_url = $glauth::download_url,
|
||||
Array $packages = $glauth::packages,
|
||||
){
|
||||
user { $user:
|
||||
ensure => present,
|
||||
system => true,
|
||||
gid => $group,
|
||||
require => Group[$group],
|
||||
}
|
||||
|
||||
group { $group:
|
||||
ensure => present,
|
||||
system => true,
|
||||
}
|
||||
|
||||
ensure_resources('package', $packages => {ensure => 'present'})
|
||||
|
||||
archive { 'glauth':
|
||||
ensure => present,
|
||||
url => $download_url,
|
||||
extract => false,
|
||||
path => $bin_path,
|
||||
creates => $bin_path,
|
||||
cleanup => false,
|
||||
extract_path => $bin_dir,
|
||||
user => 'root',
|
||||
group => 'root',
|
||||
}
|
||||
|
||||
file{ $bin_path:
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
require => Archive['glauth'],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user