From eda9ab0db5a6c7d9981f297ff242d9218a5983ef Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 9 Jul 2024 16:16:22 +0200 Subject: [PATCH 1/2] modulesync 9.1.0 --- .github/CONTRIBUTING.md | 12 ++++++++-- .github/labeler.yml | 3 +++ .github/release.yml | 42 +++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 17 ++++++++++++++ .github/workflows/release.yml | 7 ++++++ .msync.yml | 2 +- .puppet-lint.rc | 3 +++ Gemfile | 2 +- spec/spec_helper.rb | 4 ++++ 9 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 .github/release.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 88093274..daceb642 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -245,15 +245,23 @@ with: BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker ``` +or + +```sh +BEAKER_PUPPET_COLLECTION=none BEAKER_setfile=archlinux-64 bundle exec rake beaker +``` + +This latter example will use the distribution's own version of Puppet. + You can replace the string `debian11` with any common operating system. The following strings are known to work: * ubuntu2004 * ubuntu2204 * debian11 -* centos7 -* centos8 +* debian12 * centos9 +* archlinux * almalinux8 * almalinux9 * fedora36 diff --git a/.github/labeler.yml b/.github/labeler.yml index 7899de84..f2d08d6b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,3 +1,6 @@ --- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + skip-changelog: - head-branch: ['^release-*', 'release'] diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..f5b5d7a9 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,42 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes + +changelog: + exclude: + labels: + - duplicate + - invalid + - modulesync + - question + - skip-changelog + - wont-fix + - wontfix + + categories: + - title: Breaking Changes 🛠 + labels: + - backwards-incompatible + + - title: New Features 🎉 + labels: + - enhancement + + - title: Bug Fixes 🐛 + labels: + - bug + + - title: Documentation Updates 📚 + labels: + - documentation + - docs + + - title: Dependency Updates ⬆️ + labels: + - dependencies + + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..66127cd0 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,17 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +name: "Pull Request Labeler" + +on: + pull_request_target: {} + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55324aa6..93b33c2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,3 +20,10 @@ jobs: # https://docs.github.com/en/actions/security-guides/encrypted-secrets username: ${{ secrets.PUPPET_FORGE_USERNAME }} api_key: ${{ secrets.PUPPET_FORGE_API_KEY }} + + create-github-release: + name: Create GitHub Release + runs-on: ubuntu-latest + steps: + - name: Create GitHub release + uses: voxpupuli/gha-create-a-github-release@v1 diff --git a/.msync.yml b/.msync.yml index 36071685..95e8c977 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '9.0.0' +modulesync_config_version: '9.1.0' diff --git a/.puppet-lint.rc b/.puppet-lint.rc index dd8272c7..05d28a26 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -1,3 +1,6 @@ +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + --fail-on-warnings --no-parameter_documentation-check --no-parameter_types-check diff --git a/Gemfile b/Gemfile index 27cdc0de..7123c663 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 8.0', :require => false + gem 'voxpupuli-test', '~> 9.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 4.0', :require => false diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9efb4ae6..58c9b66a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,6 +9,10 @@ require 'voxpupuli/test/spec_helper' +RSpec.configure do |c| + c.facterdb_string_keys = false +end + add_mocked_facts! if File.exist?(File.join(__dir__, 'default_module_facts.yml')) From 82eda77cdae586517185277ab581bdd4ffe2ad70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Tue, 13 Aug 2024 11:28:07 +0200 Subject: [PATCH 2/2] Get rid of legacy facts --- lib/puppet/provider/openldap_access/olc.rb | 2 +- lib/puppet/provider/openldap_database/olc.rb | 2 +- lib/puppet/provider/openldap_dbindex/olc.rb | 2 +- .../provider/openldap_global_conf/olc.rb | 2 +- lib/puppet/provider/openldap_module/olc.rb | 2 +- lib/puppet/provider/openldap_overlay/olc.rb | 2 +- lib/puppet/provider/openldap_schema/olc.rb | 2 +- lib/puppet/type/openldap_database.rb | 12 ++-- spec/classes/openldap_client_config_spec.rb | 66 +++++++++---------- spec/classes/openldap_client_install_spec.rb | 2 +- spec/classes/openldap_client_spec.rb | 2 +- spec/classes/openldap_server_config_spec.rb | 2 +- spec/classes/openldap_server_install_spec.rb | 2 +- spec/classes/openldap_server_service_spec.rb | 2 +- .../classes/openldap_server_slapdconf_spec.rb | 2 +- spec/classes/openldap_server_spec.rb | 2 +- spec/classes/openldap_utils_spec.rb | 2 +- 17 files changed, 54 insertions(+), 54 deletions(-) diff --git a/lib/puppet/provider/openldap_access/olc.rb b/lib/puppet/provider/openldap_access/olc.rb index cd83ada5..1aa586de 100644 --- a/lib/puppet/provider/openldap_access/olc.rb +++ b/lib/puppet/provider/openldap_access/olc.rb @@ -11,7 +11,7 @@ provide(:olc, parent: Puppet::Provider::Openldap) do # TODO: Use ruby bindings (can't find one that support IPC) - defaultfor osfamily: %i[debian freebsd redhat suse] + defaultfor 'os.family' => %i[debian freebsd redhat suse] mk_resource_methods diff --git a/lib/puppet/provider/openldap_database/olc.rb b/lib/puppet/provider/openldap_database/olc.rb index de46b562..46590316 100644 --- a/lib/puppet/provider/openldap_database/olc.rb +++ b/lib/puppet/provider/openldap_database/olc.rb @@ -8,7 +8,7 @@ provide(:olc, parent: Puppet::Provider::Openldap) do # TODO: Use ruby bindings (can't find one that support IPC) - defaultfor osfamily: %i[debian freebsd redhat suse] + defaultfor 'os.family' => %i[debian freebsd redhat suse] mk_resource_methods diff --git a/lib/puppet/provider/openldap_dbindex/olc.rb b/lib/puppet/provider/openldap_dbindex/olc.rb index de66bf3e..ebcbb6db 100644 --- a/lib/puppet/provider/openldap_dbindex/olc.rb +++ b/lib/puppet/provider/openldap_dbindex/olc.rb @@ -10,7 +10,7 @@ provide(:olc, parent: Puppet::Provider::Openldap) do # TODO: Use ruby bindings (can't find one that support IPC) - defaultfor osfamily: %i[debian freebsd redhat suse] + defaultfor 'os.family' => %i[debian freebsd redhat suse] mk_resource_methods diff --git a/lib/puppet/provider/openldap_global_conf/olc.rb b/lib/puppet/provider/openldap_global_conf/olc.rb index be528fc4..09ec1576 100644 --- a/lib/puppet/provider/openldap_global_conf/olc.rb +++ b/lib/puppet/provider/openldap_global_conf/olc.rb @@ -8,7 +8,7 @@ provide(:olc, parent: Puppet::Provider::Openldap) do # TODO: Use ruby bindings (can't find one that support IPC) - defaultfor osfamily: %i[debian freebsd redhat suse] + defaultfor 'os.family' => %i[debian freebsd redhat suse] mk_resource_methods diff --git a/lib/puppet/provider/openldap_module/olc.rb b/lib/puppet/provider/openldap_module/olc.rb index 1787a410..773d0665 100644 --- a/lib/puppet/provider/openldap_module/olc.rb +++ b/lib/puppet/provider/openldap_module/olc.rb @@ -7,7 +7,7 @@ provide(:olc, parent: Puppet::Provider::Openldap) do # TODO: Use ruby bindings (can't find one that support IPC) - defaultfor osfamily: %i[debian freebsd redhat suse] + defaultfor 'os.family' => %i[debian freebsd redhat suse] mk_resource_methods diff --git a/lib/puppet/provider/openldap_overlay/olc.rb b/lib/puppet/provider/openldap_overlay/olc.rb index 26cc007f..88414f34 100644 --- a/lib/puppet/provider/openldap_overlay/olc.rb +++ b/lib/puppet/provider/openldap_overlay/olc.rb @@ -10,7 +10,7 @@ provide(:olc, parent: Puppet::Provider::Openldap) do # TODO: Use ruby bindings (can't find one that support IPC) - defaultfor osfamily: %i[debian freebsd redhat suse] + defaultfor 'os.family' => %i[debian freebsd redhat suse] mk_resource_methods diff --git a/lib/puppet/provider/openldap_schema/olc.rb b/lib/puppet/provider/openldap_schema/olc.rb index 32127344..5819b91d 100644 --- a/lib/puppet/provider/openldap_schema/olc.rb +++ b/lib/puppet/provider/openldap_schema/olc.rb @@ -12,7 +12,7 @@ provide(:olc, parent: Puppet::Provider::Openldap) do # TODO: Use ruby bindings (can't find one that support IPC) - defaultfor osfamily: %i[debian freebsd redhat suse] + defaultfor 'os.family' => %i[debian freebsd redhat suse] mk_resource_methods diff --git a/lib/puppet/type/openldap_database.rb b/lib/puppet/type/openldap_database.rb index e55bc010..550a014f 100644 --- a/lib/puppet/type/openldap_database.rb +++ b/lib/puppet/type/openldap_database.rb @@ -29,17 +29,17 @@ desc 'The name of the backend.' newvalues('bdb', 'hdb', 'mdb', 'monitor', 'config', 'relay', 'ldap') defaultto do - case Facter.value(:osfamily) + case Facter.value('os.family') when 'Debian' - case Facter.value(:operatingsystem) + case Facter.value('os.name') when 'Debian' - if Facter.value(:operatingsystemmajrelease).to_i <= 7 + if Facter.value('os.release.major').to_i <= 7 'hdb' else 'mdb' end when 'Ubuntu' - if Facter.value(:operatingsystemmajrelease).to_i <= 15 + if Facter.value('os.release.major').to_i <= 15 'hdb' else 'mdb' @@ -48,9 +48,9 @@ 'hdb' end when 'RedHat' - if Facter.value(:operatingsystemmajrelease).to_i <= 6 + if Facter.value('os.release.major').to_i <= 6 'bdb' - elsif Facter.value(:os).dig('release', 'major').to_i >= 9 + elsif Facter.value('os.release.major').to_i >= 9 'mdb' else 'hdb' diff --git a/spec/classes/openldap_client_config_spec.rb b/spec/classes/openldap_client_config_spec.rb index 704f1414..942721f4 100644 --- a/spec/classes/openldap_client_config_spec.rb +++ b/spec/classes/openldap_client_config_spec.rb @@ -28,7 +28,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -51,7 +51,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -74,7 +74,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -97,7 +97,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -120,7 +120,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -143,7 +143,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -166,7 +166,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -189,7 +189,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -212,7 +212,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -235,7 +235,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -258,7 +258,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -281,7 +281,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -304,7 +304,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -327,7 +327,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -350,7 +350,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -373,7 +373,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -396,7 +396,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -419,7 +419,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -442,7 +442,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -465,7 +465,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with({ @@ -492,7 +492,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -515,7 +515,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -538,7 +538,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -561,7 +561,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -583,7 +583,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('openldap::client::config') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -606,7 +606,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -629,7 +629,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -652,7 +652,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -675,7 +675,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -698,7 +698,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -727,7 +727,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -762,7 +762,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', @@ -789,7 +789,7 @@ it { is_expected.to contain_class('openldap::client::config') } it { is_expected.to contain_augeas('ldap.conf') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_augeas('ldap.conf').with(incl: '/etc/ldap/ldap.conf', diff --git a/spec/classes/openldap_client_install_spec.rb b/spec/classes/openldap_client_install_spec.rb index 80900450..17580603 100644 --- a/spec/classes/openldap_client_install_spec.rb +++ b/spec/classes/openldap_client_install_spec.rb @@ -17,7 +17,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('openldap::client::install') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' case facts[:os]['release']['major'] when '12', '22.04' diff --git a/spec/classes/openldap_client_spec.rb b/spec/classes/openldap_client_spec.rb index 08ca62a3..eed4466e 100644 --- a/spec/classes/openldap_client_spec.rb +++ b/spec/classes/openldap_client_spec.rb @@ -13,7 +13,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('openldap::client::install').that_comes_before('Class[openldap::client::config]') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' case facts[:os]['release']['major'] when '12', '22.04' diff --git a/spec/classes/openldap_server_config_spec.rb b/spec/classes/openldap_server_config_spec.rb index aecc181c..3db71ada 100644 --- a/spec/classes/openldap_server_config_spec.rb +++ b/spec/classes/openldap_server_config_spec.rb @@ -18,7 +18,7 @@ end end - next if facts[:osfamily] != 'Debian' + next if facts[:os]['family'] != 'Debian' context "on #{os} with KRB5 conf" do let(:facts) do diff --git a/spec/classes/openldap_server_install_spec.rb b/spec/classes/openldap_server_install_spec.rb index 63cb7db6..e44612cb 100644 --- a/spec/classes/openldap_server_install_spec.rb +++ b/spec/classes/openldap_server_install_spec.rb @@ -13,7 +13,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('openldap::server::install') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_package('slapd').with(ensure: :installed) diff --git a/spec/classes/openldap_server_service_spec.rb b/spec/classes/openldap_server_service_spec.rb index 4d25a346..0a799bc5 100644 --- a/spec/classes/openldap_server_service_spec.rb +++ b/spec/classes/openldap_server_service_spec.rb @@ -14,7 +14,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('openldap::server::service') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_service('slapd').with(ensure: :running, diff --git a/spec/classes/openldap_server_slapdconf_spec.rb b/spec/classes/openldap_server_slapdconf_spec.rb index ba8591e7..fa15bcff 100644 --- a/spec/classes/openldap_server_slapdconf_spec.rb +++ b/spec/classes/openldap_server_slapdconf_spec.rb @@ -13,7 +13,7 @@ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('openldap::server::slapdconf') } - case facts[:osfamily] + case facts[:os]['family'] when 'RedHat' it { is_expected.to contain_openldap__server__database('dc=my-domain,dc=com').with(ensure: :absent) } else diff --git a/spec/classes/openldap_server_spec.rb b/spec/classes/openldap_server_spec.rb index 84526069..af3de710 100644 --- a/spec/classes/openldap_server_spec.rb +++ b/spec/classes/openldap_server_spec.rb @@ -33,7 +33,7 @@ that_comes_before('Class[openldap::server]') } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_class('openldap::server').with(package: 'slapd', diff --git a/spec/classes/openldap_utils_spec.rb b/spec/classes/openldap_utils_spec.rb index e1f8f2e8..0148b7ec 100644 --- a/spec/classes/openldap_utils_spec.rb +++ b/spec/classes/openldap_utils_spec.rb @@ -12,7 +12,7 @@ context 'with no parameters' do it { is_expected.to compile.with_all_deps } - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it { is_expected.to contain_package('ldap-utils').with(ensure: :installed)