Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata updates / Dependency testing (Puppet8 support) #1342

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
24 changes: 12 additions & 12 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,48 @@ 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: 5.1.0
ref: 9.3.0
datacat:
repo: https://github.com/richardc/puppet-datacat.git
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}"
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ 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-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-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 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
Expand Down
4 changes: 2 additions & 2 deletions lib/facter/sensu_facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/sensu_secrets_vault_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 11 additions & 8 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -10,19 +10,19 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 5.1.0 < 7.0.0"
"version_requirement": ">= 9.0.0 < 10.0.0"
},
{
"name": "richardc/datacat",
"version_requirement": ">= 0.6.0 < 2.0.0"
},
{
"name": "puppetlabs/postgresql",
"version_requirement": ">= 6.4.0 < 8.0.0"
"version_requirement": ">= 9.1.0 < 10.5.0"
},
{
"name": "camptocamp/systemd",
"version_requirement": ">= 2.0.0 < 4.0.0"
"name": "puppet/systemd",
"version_requirement": ">= 2.0.0 < 7.0.0"
}
],
"operatingsystem_support": [
Expand All @@ -43,14 +43,17 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10"
"10",
"11",
"12"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"18.04",
"20.04"
"20.04",
"22.04"
]
},
{
Expand All @@ -73,7 +76,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 6.1.0 < 8.0.0"
"version_requirement": ">= 6.1.0 < 9.0.0"
}
],
"tags": [
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/provision_basic_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ 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/apt --version ">= 5.0.1 < 9.0.0"
puppet module install puppetlabs/stdlib --version ">= 9.0.0< 10.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
Expand Down
2 changes: 1 addition & 1 deletion tests/provision_basic_el.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down