diff --git a/manifests/init.pp b/manifests/init.pp index f253333..747994d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -38,7 +38,8 @@ $file_group = $bareos::params::file_group, $file_mode = $bareos::params::file_mode, $file_dir_mode = $bareos::params::file_dir_mode, - String $repo_release = '21', + $user_groups = $bareos::params::user_groups, + String $repo_release = '23', Boolean $repo_subscription = false, Optional[String[1]] $repo_username = undef, Optional[String[1]] $repo_password = undef, @@ -92,7 +93,7 @@ comment => 'Bareos system user', home => '/var/lib/bareos', shell => '/bin/false', - groups => ['disk', 'tape', $file_group], + groups => ['disk', 'tape', $file_group] + $user_groups, system => true, tag => ['bareos', 'bareos_core'], } diff --git a/manifests/params.pp b/manifests/params.pp index 84386cd..2183a11 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -5,6 +5,7 @@ $file_dir_mode = '0755' $file_owner = 'bareos' $file_group = 'bareos' + $user_groups = [] $config_dir = '/etc/bareos' $config_dir_webui = '/etc/bareos-webui' diff --git a/manifests/repository.pp b/manifests/repository.pp index 0abd35e..fc8c938 100644 --- a/manifests/repository.pp +++ b/manifests/repository.pp @@ -15,12 +15,12 @@ # Whether https should be used in repo URL # class bareos::repository ( - Enum['19.2', '20', '21'] $release = '21', - Optional[String[1]] $gpg_key_fingerprint = undef, - Boolean $subscription = false, - Optional[String] $username = undef, - Optional[String] $password = undef, - Boolean $https = true, + Enum['19.2', '20', '21', '22', '23'] $release = '23', + Optional[String[1]] $gpg_key_fingerprint = undef, + Boolean $subscription = false, + Optional[String] $username = undef, + Optional[String] $password = undef, + Boolean $https = true, ) { if $https { $scheme = 'https://' @@ -43,6 +43,12 @@ if $gpg_key_fingerprint { $_gpg_key_fingerprint = $gpg_key_fingerprint + } elsif versioncmp($release, '23') >= 0 { + # >= bareos 23 + $_gpg_key_fingerprint = '5DBE EDB2 E9D0 D238 8684 5C43 D525 2EF6 F51B CCF1' + } elsif versioncmp($release, '22') >= 0 { + # >= bareos 22 + $_gpg_key_fingerprint = '5D44 2966 81A7 3289 DBEE 58E4 59E9 68A5 59FE 211E' } elsif versioncmp($release, '21') >= 0 { # >= bareos 21 $_gpg_key_fingerprint = '91DA 1DC3 564A E20A 76C4 CA88 E019 57D6 C9FE D482' @@ -147,6 +153,7 @@ Apt::Source['bareos'] -> Package <| provider == 'apt' |> Class['Apt::Update'] -> Package <| provider == 'apt' |> } + 'windows': {} default: { fail('Operatingsystem is not supported by this module') }