diff --git a/manifests/params.pp b/manifests/params.pp index ea9bb6d..39b1358 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -7,22 +7,7 @@ $file_group = 'bareos' $config_dir = '/etc/bareos' $config_dir_webui = '/etc/bareos-webui' - - case $facts['os']['name'] { - 'Debian': { - case $facts['os']['release']['major'] { - '11': { - $repo_release = '21' - } - default: { - $repo_release = '20' - } - } - } - default: { - $repo_release = '20' - } - } + $repo_release = '20' # service/package specific # bconsole diff --git a/manifests/repository.pp b/manifests/repository.pp index e665534..22d2eed 100644 --- a/manifests/repository.pp +++ b/manifests/repository.pp @@ -122,7 +122,7 @@ } else { if versioncmp($osmajrelease, '10') >= 0 { if (versioncmp($release, '18.2') <= 0) - or ((versioncmp($release, '20') <= 0) and (versioncmp($osmajrelease, '11') >= 0)) { + or ((versioncmp($release, '20') < 0) and (versioncmp($osmajrelease, '11') >= 0)) { fail("Bareos ${release} is not distributed for Debian ${osmajrelease}") } $location = "${url}Debian_${osmajrelease}" diff --git a/spec/classes/repository_spec.rb b/spec/classes/repository_spec.rb index 63e5263..8f1505d 100644 --- a/spec/classes/repository_spec.rb +++ b/spec/classes/repository_spec.rb @@ -37,14 +37,14 @@ when 'Debian' case facts[:operatingsystemmajrelease] when '11' - context 'with release: "20"' do + context 'with release: "19.2"' do let(:params) do { - release: '20' + release: '19.2' } end - it { is_expected.to compile.and_raise_error(%r{Bareos 20 is not distributed for Debian 11}) } + it { is_expected.to compile.and_raise_error(%r{Bareos 19.2 is not distributed for Debian 11}) } end end when 'Ubuntu'