From 7331bdf82ca327f7e81ba5907c66ad31cf4a246d Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 8 Jul 2024 12:59:14 +0200 Subject: [PATCH 1/3] replace claranet/timezone with puppet/systemd Fixes: #2101 --- puppet/Puppetfile | 1 - puppet/data/common.yaml | 2 ++ puppet/modules/profiles/manifests/base.pp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/puppet/Puppetfile b/puppet/Puppetfile index cd8c27965..7184ee20c 100644 --- a/puppet/Puppetfile +++ b/puppet/Puppetfile @@ -1,7 +1,6 @@ moduledir 'external_modules' mod 'citrin/htpasswd', '1.0.2' -mod 'claranet/timezone', '2.0.1' mod 'puppet/archive', '7.1.0' mod 'puppet/augeasproviders_core', '4.1.0' mod 'puppet/augeasproviders_mounttab', '4.0.0' diff --git a/puppet/data/common.yaml b/puppet/data/common.yaml index 333e78927..a1b4ad191 100644 --- a/puppet/data/common.yaml +++ b/puppet/data/common.yaml @@ -237,3 +237,5 @@ sudo::wheel_config: password redmine::https: true apache::default_vhost: false + +systemd::timezone: UTC diff --git a/puppet/modules/profiles/manifests/base.pp b/puppet/modules/profiles/manifests/base.pp index 541a2161b..dc9920d2f 100644 --- a/puppet/modules/profiles/manifests/base.pp +++ b/puppet/modules/profiles/manifests/base.pp @@ -4,7 +4,7 @@ include motd include puppet include ssh - include timezone + include systemd include unattended if $facts['os']['family'] == 'RedHat' { package { 'ntp': From 0b1ff0c6c82e096332df786d874c265fe35bc3c4 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 8 Jul 2024 13:05:56 +0200 Subject: [PATCH 2/3] use facts[:os]['family'] instead of facts[:osfamily] in tests --- puppet/spec/classes/jenkins_node_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/puppet/spec/classes/jenkins_node_spec.rb b/puppet/spec/classes/jenkins_node_spec.rb index 75030d15f..0cace568e 100644 --- a/puppet/spec/classes/jenkins_node_spec.rb +++ b/puppet/spec/classes/jenkins_node_spec.rb @@ -13,14 +13,14 @@ end it { is_expected.to compile.with_all_deps } it { is_expected.to contain_users__account('jenkins').with_sudo(false) } - if facts[:osfamily] == 'Debian' + if facts[:os]['family'] == 'Debian' it { is_expected.to contain_class('sudo') } it { is_expected.to contain_sudo__conf('sudo-puppet-jenkins').with_content('jenkins ALL=NOPASSWD: ALL') } else it { is_expected.not_to contain_class('sudo') } end - if facts[:osfamily] == 'Debian' + if facts[:os]['family'] == 'Debian' it { is_expected.to contain_file('/etc/pbuilder/bullseye64/hooks/A10nozstd').with_ensure('absent') } it { is_expected.to contain_file('/etc/pbuilder/jammy64/hooks/A10nozstd').with_ensure('present') } it { is_expected.to contain_file('/etc/pbuilder/bullseye64/hooks/C10foremanlog').with_ensure('present') } @@ -49,7 +49,7 @@ it { is_expected.to contain_package('jq') } end - if facts[:osfamily] == 'RedHat' + if facts[:os]['family'] == 'RedHat' context "unittest only node" do let(:params) do {uploader: false, packaging: false, unittests: true} From c578f529452bf5faaa258fb5f9957436b3a709f9 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 9 Jul 2024 09:28:57 +0200 Subject: [PATCH 3/3] Revert "pin facterdb to 2.x until we fix our modules" This reverts commit 3601e41dc1e637b9c14d455d13d5e2d9a8db72a0. --- puppet/Gemfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/puppet/Gemfile b/puppet/Gemfile index b0a83c430..9297d4816 100644 --- a/puppet/Gemfile +++ b/puppet/Gemfile @@ -21,5 +21,3 @@ gem 'puppet-lint-version_comparison-check', require: false gem 'puppet-syntax', require: false gem 'rspec-puppet', require: false gem 'rspec-puppet-facts', require: false - -gem 'facterdb', '~> 2.0', require: false