diff --git a/manifests/init.pp b/manifests/init.pp index a59ffaf..c011b87 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -150,7 +150,7 @@ Yumrepo['bird'] -> Package <| name == $package_name_v4 or name == $package_name_v6 |> } - ensure_packages([$package_name_v4], { 'ensure' => 'present' }) + stdlib::ensure_packages([$package_name_v4], { 'ensure' => 'present' }) if $manage_service { service { $daemon_name_v4: @@ -214,7 +214,7 @@ fail('The bird version in Archlinux does not provide a seperate daemon for IPv6. You cannot explicitly enable it. The default daemon already has IPv6 support') } - ensure_packages([$package_name_v6], { 'ensure' => 'present' }) + stdlib::ensure_packages([$package_name_v6], { 'ensure' => 'present' }) if $manage_service { service { $daemon_name_v6: diff --git a/metadata.json b/metadata.json index 1cc218f..8c25da6 100644 --- a/metadata.json +++ b/metadata.json @@ -20,7 +20,6 @@ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "9", "10" ] }, @@ -36,7 +35,7 @@ "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 4.25.0 < 10.0.0" + "version_requirement": ">= 9.0.0 < 10.0.0" } ], "requirements": [ diff --git a/spec/acceptance/bird_spec.rb b/spec/acceptance/bird_spec.rb index b97fbd6..805d2f4 100644 --- a/spec/acceptance/bird_spec.rb +++ b/spec/acceptance/bird_spec.rb @@ -10,7 +10,7 @@ class { 'bird': manage_service => true, service_v4_enable => true, - enable_v6 => true, + enable_v6 => $facts['os']['family'] != 'Archlinux', service_v6_enable => true, service_v6_ensure => bool2str($facts['os']['family'] == 'RedHat', 'stopped', 'running'), } @@ -32,13 +32,15 @@ class { 'bird': it { is_expected.to be_running } end - describe service('bird6') do - it { is_expected.to be_enabled } + if fact('os.family') != 'Archlinux' + describe service('bird6') do + it { is_expected.to be_enabled } - if fact('os.family') == 'RedHat' - it { is_expected.not_to be_running } - else - it { is_expected.to be_running } + if fact('os.family') == 'RedHat' + it { is_expected.not_to be_running } + else + it { is_expected.to be_running } + end end end end