Skip to content

Commit 276be1b

Browse files
authored
Merge branch 'voxpupuli:master' into fix-role-regex
2 parents d109fbc + 1098bd1 commit 276be1b

18 files changed

+127
-47
lines changed

.github/CONTRIBUTING.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,15 +245,23 @@ with:
245245
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
246246
```
247247

248+
or
249+
250+
```sh
251+
BEAKER_PUPPET_COLLECTION=none BEAKER_setfile=archlinux-64 bundle exec rake beaker
252+
```
253+
254+
This latter example will use the distribution's own version of Puppet.
255+
248256
You can replace the string `debian11` with any common operating system.
249257
The following strings are known to work:
250258

251259
* ubuntu2004
252260
* ubuntu2204
253261
* debian11
254-
* centos7
255-
* centos8
262+
* debian12
256263
* centos9
264+
* archlinux
257265
* almalinux8
258266
* almalinux9
259267
* fedora36

.github/labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
skip-changelog:
6+
- head-branch: ['^release-*', 'release']

.github/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
6+
7+
changelog:
8+
exclude:
9+
labels:
10+
- duplicate
11+
- invalid
12+
- modulesync
13+
- question
14+
- skip-changelog
15+
- wont-fix
16+
- wontfix
17+
18+
categories:
19+
- title: Breaking Changes 🛠
20+
labels:
21+
- backwards-incompatible
22+
23+
- title: New Features 🎉
24+
labels:
25+
- enhancement
26+
27+
- title: Bug Fixes 🐛
28+
labels:
29+
- bug
30+
31+
- title: Documentation Updates 📚
32+
labels:
33+
- documentation
34+
- docs
35+
36+
- title: Dependency Updates ⬆️
37+
labels:
38+
- dependencies
39+
40+
- title: Other Changes
41+
labels:
42+
- "*"

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
name: CI
66

7+
# yamllint disable-line rule:truthy
78
on:
89
pull_request: {}
910
push:
@@ -18,7 +19,7 @@ concurrency:
1819
jobs:
1920
puppet:
2021
name: Puppet
21-
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
22+
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v3
2223
with:
2324
beaker_hosts: 'host1:shard.ma;host2:slave,router.a'
24-
beaker_facter: 'mongodb_repo_version:MongoDB:5.0,6.0,7.0'
25+
beaker_facter: 'mongodb_repo_version:MongoDB:6.0,7.0'

.github/workflows/labeler.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
name: "Pull Request Labeler"
6+
7+
# yamllint disable-line rule:truthy
8+
on:
9+
pull_request_target: {}
10+
11+
jobs:
12+
labeler:
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/labeler@v5

.github/workflows/prepare_release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
name: 'Prepare Release'
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: 'Module version to be released. Must be a valid semver string without leading v. (1.2.3)'
12+
required: false
13+
14+
jobs:
15+
release_prep:
16+
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3'
17+
with:
18+
version: ${{ github.event.inputs.version }}
19+
allowed_owner: 'voxpupuli'
20+
secrets:
21+
# Configure secrets here:
22+
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
23+
github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}'

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
name: Release
66

7+
# yamllint disable-line rule:truthy
78
on:
89
push:
910
tags:
@@ -12,7 +13,7 @@ on:
1213
jobs:
1314
release:
1415
name: Release
15-
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2
16+
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3
1617
with:
1718
allowed_owner: 'voxpupuli'
1819
secrets:

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Managed by modulesync - DO NOT EDIT
33
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
44

5-
modulesync_config_version: '8.0.1'
5+
modulesync_config_version: '9.7.0'

.pmtignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
/.github/
2121
/.librarian/
2222
/Puppetfile.lock
23+
/Puppetfile
2324
*.iml
2425
/.editorconfig
2526
/.fixtures.yml

.puppet-lint.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Managed by modulesync - DO NOT EDIT
2+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
3+
14
--fail-on-warnings
25
--no-parameter_documentation-check
36
--no-parameter_types-check

.sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ appveyor.yml:
44
.github/workflows/ci.yml:
55
with:
66
beaker_hosts: 'host1:shard.ma;host2:slave,router.a'
7-
beaker_facter: 'mongodb_repo_version:MongoDB:5.0,6.0,7.0'
7+
beaker_facter: 'mongodb_repo_version:MongoDB:6.0,7.0'

Gemfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
55

66
group :test do
7-
gem 'voxpupuli-test', '~> 7.2', :require => false
8-
gem 'coveralls', :require => false
9-
gem 'simplecov-console', :require => false
10-
gem 'puppet_metadata', '~> 4.0', :require => false
7+
gem 'voxpupuli-test', '~> 10.0', :require => false
8+
gem 'puppet_metadata', '~> 5.0', :require => false
119
end
1210

1311
group :development do
@@ -16,7 +14,7 @@ group :development do
1614
end
1715

1816
group :system_tests do
19-
gem 'voxpupuli-acceptance', '~> 3.0', :require => false
17+
gem 'voxpupuli-acceptance', '~> 3.5', :require => false
2018
end
2119

2220
group :release do
@@ -26,7 +24,7 @@ end
2624
gem 'rake', :require => false
2725
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]
2826

29-
puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24'
27+
puppetversion = ENV['PUPPET_GEM_VERSION'] || [">= 7.24", "< 9"]
3028
gem 'puppet', puppetversion, :require => false, :groups => [:test]
3129

3230
# vim: syntax=ruby

metadata.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@
1111
{
1212
"operatingsystem": "RedHat",
1313
"operatingsystemrelease": [
14-
"7",
1514
"8",
1615
"9"
1716
]
1817
},
1918
{
2019
"operatingsystem": "CentOS",
2120
"operatingsystemrelease": [
22-
"7",
23-
"8",
2421
"9"
2522
]
2623
},
@@ -48,15 +45,13 @@
4845
{
4946
"operatingsystem": "Debian",
5047
"operatingsystemrelease": [
51-
"10",
5248
"11",
5349
"12"
5450
]
5551
},
5652
{
5753
"operatingsystem": "Ubuntu",
5854
"operatingsystemrelease": [
59-
"20.04",
6055
"22.04"
6156
]
6257
},
@@ -89,7 +84,7 @@
8984
},
9085
{
9186
"name": "puppet/systemd",
92-
"version_requirement": ">= 5.1.0 < 8.0.0"
87+
"version_requirement": ">= 5.1.0 < 9.0.0"
9388
},
9489
{
9590
"name": "puppet/zypprepo",

spec/classes/mongos_spec.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
# install
8080
it { is_expected.to contain_class('mongodb::mongos::install') }
8181

82-
if facts[:osfamily] == 'Suse'
82+
if facts[:os]['family'] == 'Suse'
8383
it { is_expected.to contain_package('mongodb_mongos').with_ensure('absent') }
8484
else
8585
it { is_expected.to contain_package('mongodb_mongos').with_ensure('purged') }
@@ -95,12 +95,4 @@
9595
end
9696
end
9797
end
98-
99-
context 'when deploying on Solaris' do
100-
let :facts do
101-
{ osfamily: 'Solaris' }
102-
end
103-
104-
it { is_expected.to compile.and_raise_error(%r{is not applicable to an Undef Value}) }
105-
end
10698
end

spec/classes/repo_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
end
2222

23-
case facts[:osfamily]
23+
case facts[:os]['family']
2424
when 'RedHat'
2525
it { is_expected.to contain_class('mongodb::repo::yum') }
2626

@@ -38,18 +38,18 @@
3838
when 'Debian'
3939
it { is_expected.to contain_class('mongodb::repo::apt') }
4040

41-
case facts[:operatingsystem]
41+
case facts[:os]['name']
4242
when 'Debian'
4343
it do
4444
is_expected.to contain_apt__source('mongodb').
4545
with_location('https://repo.mongodb.org/apt/debian').
46-
with_release("#{facts[:lsbdistcodename]}/mongodb-org/5.0")
46+
with_release("#{facts[:os]['distro']['codename']}/mongodb-org/5.0")
4747
end
4848
when 'Ubuntu'
4949
it do
5050
is_expected.to contain_apt__source('mongodb').
5151
with_location('https://repo.mongodb.org/apt/ubuntu').
52-
with_release("#{facts[:lsbdistcodename]}/mongodb-org/5.0")
52+
with_release("#{facts[:os]['distro']['codename']}/mongodb-org/5.0")
5353
end
5454
end
5555
else
@@ -67,7 +67,7 @@
6767
}
6868
end
6969

70-
case facts[:osfamily]
70+
case facts[:os]['family']
7171
when 'RedHat'
7272
it { is_expected.to contain_class('mongodb::repo::yum') }
7373

spec/classes/server_spec.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -833,12 +833,4 @@
833833
end
834834
end
835835
end
836-
837-
context 'when deploying on Solaris' do
838-
let :facts do
839-
{ osfamily: 'Solaris' }
840-
end
841-
842-
it { is_expected.to raise_error(Puppet::Error) }
843-
end
844836
end

spec/spec_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
require 'voxpupuli/test/spec_helper'
1111

12+
RSpec.configure do |c|
13+
c.facterdb_string_keys = false
14+
end
15+
1216
add_mocked_facts!
1317

1418
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))

spec/support/acceptance/supported_version.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
def supported_version?(platform, version)
44
return true if version.nil?
55

6-
supported_versions = %w[5.0 6.0 7.0]
6+
supported_versions = %w[6.0 7.0]
77
return false unless supported_versions.include?(version)
88

99
supported_versions.reject! do |v|
10-
(v < '6.0' && platform.start_with?('el-9')) ||
11-
(v > '6.0' && platform.start_with?('debian-10')) ||
12-
(v < '5.0' && platform.start_with?('debian-11')) ||
13-
(v < '7.0' && platform.start_with?('debian-12')) ||
14-
(v < '6.0' && platform.start_with?('ubuntu-22'))
10+
(v < '7.0' && platform.start_with?('debian-12'))
1511
end
1612

1713
supported_versions.include?(version)

0 commit comments

Comments
 (0)