From 5b15b895cabbd89c5f2b54b29b97395fe5d01689 Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 17 Aug 2023 14:39:17 +0200 Subject: [PATCH 01/11] update stdlib --- lib/facter/sensu_facts.rb | 4 ++-- lib/puppet/type/sensu_secrets_vault_provider.rb | 2 +- spec/spec_helper_acceptance.rb | 4 ++-- tests/provision_basic_debian.sh | 2 +- tests/provision_basic_el.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/facter/sensu_facts.rb b/lib/facter/sensu_facts.rb index 139054a674..32a42ad59b 100644 --- a/lib/facter/sensu_facts.rb +++ b/lib/facter/sensu_facts.rb @@ -3,9 +3,9 @@ module SensuFacts def self.which(cmd) path = nil - if File.exists?("C:\\Program Files\\sensu\\sensu-agent\\bin\\#{cmd}.exe") + if File.exist?("C:\\Program Files\\sensu\\sensu-agent\\bin\\#{cmd}.exe") path = "C:\\Program Files\\sensu\\sensu-agent\\bin\\#{cmd}.exe" - elsif File.exists?("C:\\Program Files\\Sensu\\#{cmd}.exe") + elsif File.exist?("C:\\Program Files\\Sensu\\#{cmd}.exe") path = "C:\\Program Files\\Sensu\\#{cmd}.exe" else path = Facter::Core::Execution.which(cmd) diff --git a/lib/puppet/type/sensu_secrets_vault_provider.rb b/lib/puppet/type/sensu_secrets_vault_provider.rb index 65c354cfab..a08a602fce 100644 --- a/lib/puppet/type/sensu_secrets_vault_provider.rb +++ b/lib/puppet/type/sensu_secrets_vault_provider.rb @@ -155,7 +155,7 @@ def should_to_s(newvalue) end def refresh - if provider.exists? && @parameters[:ensure].value.to_s == 'present' && ! @parameters[:token_file].value.nil? + if provider.exist? && @parameters[:ensure].value.to_s == 'present' && ! @parameters[:token_file].value.nil? provider.flush(true) end end diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index ee9ecc46cb..3aaf77ff6a 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -29,7 +29,7 @@ else enterprise_file = File.join(project_dir, 'tests/sensu_license.json') end - if File.exists?(enterprise_file) + if File.exist?(enterprise_file) scp_to(hosts_as('sensu-backend'), enterprise_file, '/root/sensu_license.json') c.sensu_test_enterprise = true else @@ -38,7 +38,7 @@ ci_build = File.join(project_dir, 'tests/ci_build.sh') secrets = File.join(project_dir, 'tests/secrets') - if File.exists?(secrets) && (ENV['BEAKER_sensu_ci_build'] == 'yes' || ENV['BEAKER_sensu_ci_build'] == 'true') + if File.exist?(secrets) && (ENV['BEAKER_sensu_ci_build'] == 'yes' || ENV['BEAKER_sensu_ci_build'] == 'true') c.sensu_manage_repo = false c.add_ci_repo = true end diff --git a/tests/provision_basic_debian.sh b/tests/provision_basic_debian.sh index 7aad0c9783..db6f7c604d 100644 --- a/tests/provision_basic_debian.sh +++ b/tests/provision_basic_debian.sh @@ -52,7 +52,7 @@ EOF puppet resource file /etc/puppetlabs/code/environments/production/modules/sensu ensure=link target=/vagrant # setup module dependencies -puppet module install puppetlabs/stdlib --version ">= 5.1.0 < 8.0.0" +puppet module install puppetlabs/stdlib --version ">= 9.0.0< 10.0.0" puppet module install puppetlabs/apt --version ">= 5.0.1 < 9.0.0" puppet module install richardc-datacat --version ">= 0.6.2 < 2.0.0" diff --git a/tests/provision_basic_el.sh b/tests/provision_basic_el.sh index 3dde1272b8..c2ec7eb63b 100644 --- a/tests/provision_basic_el.sh +++ b/tests/provision_basic_el.sh @@ -30,7 +30,7 @@ fi puppet resource file /etc/puppetlabs/code/environments/production/modules/sensu ensure=link target=/vagrant # setup module dependencies -puppet module install puppetlabs/stdlib --version ">= 5.1.0 < 8.0.0" +puppet module install puppetlabs/stdlib --version ">= 9.0.0< 10.0.0" puppet module install richardc-datacat --version ">= 0.6.2 < 2.0.0" puppet resource host sensu-backend.example.com ensure=present ip=192.168.52.10 host_aliases=sensu-backend From 91c0e64eab4ba9f2093d0d14f208a89fe8cd9685 Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Wed, 23 Aug 2023 14:03:41 +0200 Subject: [PATCH 02/11] Update metadata.json --- metadata.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/metadata.json b/metadata.json index 6a556a5b68..704653f00b 100644 --- a/metadata.json +++ b/metadata.json @@ -10,7 +10,7 @@ "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 5.1.0 < 7.0.0" + "version_requirement": ">= 9.0.0 < 7.0.0" }, { "name": "richardc/datacat", @@ -43,7 +43,8 @@ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "10" + "10", + "11" ] }, { @@ -73,7 +74,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 6.1.0 < 8.0.0" + "version_requirement": ">= 6.1.0 < 9.0.0" } ], "tags": [ From 1f2a10ab9df1bea3a446c0be26ac8893d63d8c6c Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 24 Aug 2023 08:28:19 +0200 Subject: [PATCH 03/11] Update stdlib dependencie properly --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 704653f00b..4546d8d46e 100644 --- a/metadata.json +++ b/metadata.json @@ -10,7 +10,7 @@ "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 9.0.0 < 7.0.0" + "version_requirement": ">= 9.0.0 < 10.0.0" }, { "name": "richardc/datacat", From 4e82823ac1991cc30148c7cf0eafc8eab39c4a86 Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 24 Aug 2023 08:31:30 +0200 Subject: [PATCH 04/11] Update stdlib dependencies in appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 15b7811676..2836f17ce8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,7 +27,7 @@ install: - ps: Copy-Item -Path "${ENV:APPVEYOR_BUILD_FOLDER}/lib/facter" -Destination C:/ProgramData/PuppetLabs/puppet/cache/lib/facter -Recurse - set PATH=C:\Program Files\Puppet Labs\Puppet\bin;%PATH% - puppet --version -- puppet module install puppetlabs-stdlib --version ">= 5.1.0 < 7.0.0" +- puppet module install puppetlabs-stdlib --version ">= 9.0.0 < 10.0.0" - puppet module install puppetlabs-chocolatey --version ">= 3.0.0 < 7.0.0" - puppet module install puppet-archive --version ">= 3.0.0 < 5.0.0" - puppet module install puppet-windows_env --version ">= 3.0.0 < 5.0.0" From 896cd31b86254cc36444f97b0f99703fa339d67d Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 24 Aug 2023 08:31:42 +0200 Subject: [PATCH 05/11] Update stdlib in .fixtures.yml --- .fixtures.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.fixtures.yml b/.fixtures.yml index e3bc01c886..e7f5abede1 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -5,7 +5,7 @@ fixtures: ref: 5.0.1 stdlib: repo: https://github.com/puppetlabs/puppetlabs-stdlib.git - ref: 5.1.0 + ref: 9.3.0 datacat: repo: https://github.com/richardc/puppet-datacat.git ref: 0.6.2 From a69b72427ce06f5373b76449e71009d4039c57d0 Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 24 Aug 2023 08:54:21 +0200 Subject: [PATCH 06/11] Update modules to work with stdlib 9 in metadata.json --- metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.json b/metadata.json index 4546d8d46e..7a6e7b6133 100644 --- a/metadata.json +++ b/metadata.json @@ -18,11 +18,11 @@ }, { "name": "puppetlabs/postgresql", - "version_requirement": ">= 6.4.0 < 8.0.0" + "version_requirement": ">= 9.1.0 < 10.0.0" }, { "name": "camptocamp/systemd", - "version_requirement": ">= 2.0.0 < 4.0.0" + "version_requirement": ">= 2.0.0 < 6.0.0" } ], "operatingsystem_support": [ From 1c331f7379b67dac9ae76d12be25d33cbeeb03bf Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 24 Aug 2023 08:56:55 +0200 Subject: [PATCH 07/11] Update module to work with stdlib 9 in appveyor.yml --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2836f17ce8..0af73132ce 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,9 +28,9 @@ install: - set PATH=C:\Program Files\Puppet Labs\Puppet\bin;%PATH% - puppet --version - puppet module install puppetlabs-stdlib --version ">= 9.0.0 < 10.0.0" -- puppet module install puppetlabs-chocolatey --version ">= 3.0.0 < 7.0.0" -- puppet module install puppet-archive --version ">= 3.0.0 < 5.0.0" -- puppet module install puppet-windows_env --version ">= 3.0.0 < 5.0.0" +- puppet module install puppetlabs-chocolatey --version ">= 8.0.0 < 9.0.0" +- puppet module install puppet-archive --version ">= 7.0.0 < 8.0.0" +- puppet module install puppet-windows_env --version ">= 5.0.0 < 6.0.0" - puppet module install richardc-datacat --version ">= 0.6.0 < 2.0.0" - puppet config set --section main certname sensu_agent - facter -p --debug From 73cd009f672dab8100ddd6ca4e7006097ce18822 Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 24 Aug 2023 08:57:04 +0200 Subject: [PATCH 08/11] Update module to work with stdlib 9 in .fixtures.yml --- .fixtures.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index e7f5abede1..0bfd608929 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -2,7 +2,7 @@ fixtures: repositories: apt: repo: https://github.com/puppetlabs/puppetlabs-apt.git - ref: 5.0.1 + ref: 9.1.0 stdlib: repo: https://github.com/puppetlabs/puppetlabs-stdlib.git ref: 9.3.0 @@ -11,39 +11,39 @@ fixtures: ref: 0.6.2 yumrepo_core: repo: https://github.com/puppetlabs/puppetlabs-yumrepo_core - ref: 1.0.1 + ref: 2.0.0 puppet_version: ">= 6.0.0" chocolatey: repo: https://github.com/puppetlabs/puppetlabs-chocolatey.git - ref: 3.0.0 + ref: 8.0.0 # Needed by chocolatey registry: repo: https://github.com/puppetlabs/puppetlabs-registry.git - ref: 1.0.0 + ref: 5.0.1 # Needed by chocolatey powershell: repo: https://github.com/puppetlabs/puppetlabs-powershell.git - ref: 1.0.1 + ref: 6.0.0 # Need by postgresql augeas_core: repo: https://github.com/puppetlabs/puppetlabs-augeas_core - ref: 1.0.4 + ref: 1.3.0 puppet_version: ">= 6.0.0" # Need by postgresql concat: repo: https://github.com/puppetlabs/puppetlabs-concat.git - ref: v6.0.0 + ref: 9.0.0 postgresql: repo: https://github.com/puppetlabs/puppetlabs-postgresql.git - ref: v6.4.0 + ref: 9.1.0 archive: repo: https://github.com/voxpupuli/puppet-archive.git - ref: 'v3.0.0' + ref: 7.0.0 windows_env: repo: https://github.com/voxpupuli/puppet-windows_env.git - ref: 'v3.0.0' + ref: 5.0.0 systemd: repo: https://github.com/camptocamp/puppet-systemd.git - ref: '2.0.0' + ref: 5.2.0 symlinks: sensu: "#{source_dir}" From 7033ac96889aa0b1c8b8747812c400bdb482576f Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 24 Aug 2023 09:04:30 +0200 Subject: [PATCH 09/11] Update puppet-windows-env module name appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0af73132ce..a07c0d417c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,7 +30,7 @@ install: - puppet module install puppetlabs-stdlib --version ">= 9.0.0 < 10.0.0" - puppet module install puppetlabs-chocolatey --version ">= 8.0.0 < 9.0.0" - puppet module install puppet-archive --version ">= 7.0.0 < 8.0.0" -- puppet module install puppet-windows_env --version ">= 5.0.0 < 6.0.0" +- puppet module install puppetlabs-windows_env --version ">= 5.0.0 < 6.0.0" - puppet module install richardc-datacat --version ">= 0.6.0 < 2.0.0" - puppet config set --section main certname sensu_agent - facter -p --debug From d7e1a4527e50742714fd5127e80a4641f28abe2d Mon Sep 17 00:00:00 2001 From: David Phayanouvong Date: Thu, 24 Aug 2023 09:09:16 +0200 Subject: [PATCH 10/11] Update test requierement for Debian --- tests/provision_basic_debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/provision_basic_debian.sh b/tests/provision_basic_debian.sh index db6f7c604d..6923451c00 100644 --- a/tests/provision_basic_debian.sh +++ b/tests/provision_basic_debian.sh @@ -53,7 +53,7 @@ puppet resource file /etc/puppetlabs/code/environments/production/modules/sensu # setup module dependencies puppet module install puppetlabs/stdlib --version ">= 9.0.0< 10.0.0" -puppet module install puppetlabs/apt --version ">= 5.0.1 < 9.0.0" +puppet module install puppetlabs/apt --version ">= 9.0.0 < 10.0.0" puppet module install richardc-datacat --version ">= 0.6.2 < 2.0.0" puppet resource host sensu-backend.example.com ensure=present ip=192.168.52.10 host_aliases=sensu-backend From 98b8c6de3306a36df7b9072d3edea63e33c07754 Mon Sep 17 00:00:00 2001 From: Patrick Tully Date: Tue, 23 Apr 2024 15:02:26 -0400 Subject: [PATCH 11/11] updated dependencies --- metadata.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/metadata.json b/metadata.json index 7a6e7b6133..789db7e070 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "sensu-sensu", - "version": "5.11.1", + "version": "5.11.2", "author": "sensu", "summary": "A module to install the Sensu monitoring framework", "license": "MIT", @@ -18,11 +18,11 @@ }, { "name": "puppetlabs/postgresql", - "version_requirement": ">= 9.1.0 < 10.0.0" + "version_requirement": ">= 9.1.0 < 10.5.0" }, { - "name": "camptocamp/systemd", - "version_requirement": ">= 2.0.0 < 6.0.0" + "name": "puppet/systemd", + "version_requirement": ">= 2.0.0 < 7.0.0" } ], "operatingsystem_support": [ @@ -44,14 +44,16 @@ "operatingsystem": "Debian", "operatingsystemrelease": [ "10", - "11" + "11", + "12" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "18.04", - "20.04" + "20.04", + "22.04" ] }, {