Skip to content

Commit 729a41c

Browse files
authored
Merge pull request #388 from voxpupuli/modulesync
modulesync 9.1.0
2 parents a38a0cd + 248e7c8 commit 729a41c

22 files changed

+127
-59
lines changed

.github/CONTRIBUTING.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,29 @@ You can install all needed gems for spec tests into the modules directory by
131131
running:
132132

133133
```sh
134-
bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)"
134+
bundle config set --local path '.vendor/'
135+
bundle config set --local without 'development system_tests release'
136+
bundle install --jobs "$(nproc)"
135137
```
136138

137139
If you also want to run acceptance tests:
138140

139141
```sh
140-
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"
142+
bundle config set --local path '.vendor/'
143+
bundle config set --local without 'development release'
144+
bundle config set --local with 'system_tests'
145+
bundle install --jobs "$(nproc)"
141146
```
142147

143148
Our all in one solution if you don't know if you need to install or update gems:
144149

145150
```sh
146-
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean
151+
bundle config set --local path '.vendor/'
152+
bundle config set --local without 'development release'
153+
bundle config set --local with 'system_tests'
154+
bundle install --jobs "$(nproc)"
155+
bundle update
156+
bundle clean
147157
```
148158

149159
As an alternative to the `--jobs "$(nproc)` parameter, you can set an
@@ -235,15 +245,23 @@ with:
235245
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
236246
```
237247

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+
238256
You can replace the string `debian11` with any common operating system.
239257
The following strings are known to work:
240258

241259
* ubuntu2004
242260
* ubuntu2204
243261
* debian11
244-
* centos7
245-
* centos8
262+
* debian12
246263
* centos9
264+
* archlinux
247265
* almalinux8
248266
* almalinux9
249267
* fedora36
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
---
12
# Managed by modulesync - DO NOT EDIT
23
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
34

4-
--format documentation
5-
--color
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ concurrency:
1818
jobs:
1919
puppet:
2020
name: Puppet
21-
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v1
21+
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v2

.github/workflows/labeler.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
on:
8+
pull_request_target: {}
9+
10+
jobs:
11+
labeler:
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/labeler@v5

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ jobs:
2020
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
2121
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
2222
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}
23+
24+
create-github-release:
25+
name: Create GitHub Release
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Create GitHub release
29+
uses: voxpupuli/gha-create-a-github-release@v1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@
2121
.*.sw?
2222
/.yardoc/
2323
/Guardfile
24+
bolt-debug.log
25+
.rerun.json

.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: '7.3.0'
5+
modulesync_config_version: '9.1.0'

.overcommit.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ PreCommit:
4343
enabled: true
4444
description: 'Runs rubocop on modified files only'
4545
command: ['bundle', 'exec', 'rubocop']
46-
PuppetLint:
46+
RakeTarget:
4747
enabled: true
48-
description: 'Runs puppet-lint on modified files only'
49-
command: ['bundle', 'exec', 'puppet-lint']
48+
description: 'Runs lint on modified files only'
49+
targets:
50+
- 'lint'
51+
command: ['bundle', 'exec', 'rake']
5052
YamlSyntax:
5153
enabled: true
5254
JsonSyntax:

.puppet-lint.rc

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

.rspec_parallel

Lines changed: 0 additions & 4 deletions
This file was deleted.

.sync.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
22
spec/spec_helper.rb:
33
mock_with: ':mocha'
4+
facterdb_string_keys: true
45
.puppet-lint.rc:
56
disabled_lint_checks:
67
- anchor_resource
78
enabled_lint_checks:
89
- parameter_documentation
910
- parameter_types
11+
.github/workflows/ci.yml:
12+
acceptance_tests: false

Dockerfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

Gemfile

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

66
group :test do
7-
gem 'voxpupuli-test', '~> 7.0', :require => false
7+
gem 'voxpupuli-test', '~> 9.0', :require => false
88
gem 'coveralls', :require => false
99
gem 'simplecov-console', :require => false
10-
gem 'puppet_metadata', '~> 3.5', :require => false
10+
gem 'puppet_metadata', '~> 4.0', :require => false
1111
end
1212

1313
group :development do

spec/classes/selinux_config_mode_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
context "on #{os}" do
88
context 'when in enforcing mode' do
99
let(:facts) do
10-
override_facts(os_facts, os: { selinux: {
10+
override_facts(os_facts, 'os' => { 'selinux' => {
1111
'enabled' => true,
1212
'enforced' => true,
1313
'config_mode' => 'enforcing',
@@ -68,15 +68,15 @@
6868
let(:facts) do
6969
# Get a deep copy and then fully override the selinux facts
7070
result = override_facts(os_facts)
71-
result[:os]['selinux'] = { 'enabled' => false }
71+
result['os']['selinux'] = { 'enabled' => false }
7272
result
7373
end
7474

7575
%w[permissive enforcing].each do |target_mode|
7676
context "and requesting #{target_mode} mode" do
7777
let(:params) { { mode: target_mode } }
7878

79-
if os_facts[:osfamily] == 'Debian'
79+
if os_facts['os']['family'] == 'Debian'
8080
it { is_expected.to contain_exec('activate-selinux') }
8181
else
8282
it { is_expected.not_to contain_exec('activate-selinux') }

spec/defines/selinux_boolean_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
context 'SELinux enabled' do
1818
let(:facts) do
19-
override_facts(super(), os: { selinux: { enabled: true } })
19+
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } })
2020
end
2121

2222
['on', true, 'present'].each do |value|
@@ -56,7 +56,7 @@
5656

5757
context 'SELinux disabled' do
5858
let(:facts) do
59-
override_facts(super(), os: { selinux: { enabled: false } })
59+
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } })
6060
end
6161

6262
['on', true, 'present'].each do |value|

spec/defines/selinux_fcontext_equivalence_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
context 'SELinux enabled' do
1515
let(:facts) do
16-
override_facts(super(), os: { selinux: { enabled: true } })
16+
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } })
1717
end
1818

1919
context 'ordering on ensure => present' do
@@ -44,7 +44,7 @@
4444

4545
context 'SELinux disabled' do
4646
let(:facts) do
47-
override_facts(super(), os: { selinux: { enabled: false } })
47+
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } })
4848
end
4949

5050
context 'make sure it compiles' do

spec/defines/selinux_fcontext_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
on_supported_os.each do |os, os_facts|
99
context "on #{os}" do
1010
let(:facts) do
11-
override_facts(os_facts, os: { selinux: { enabled: true } })
11+
override_facts(os_facts, 'os' => { 'selinux' => { 'enabled' => true } })
1212
end
1313

1414
context 'ordering' do

spec/defines/selinux_module_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
context 'SELinux enabled' do
2121
let(:facts) do
22-
override_facts(super(), os: { selinux: { enabled: true } })
22+
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } })
2323
end
2424

2525
context 'ordering' do
@@ -201,7 +201,7 @@
201201

202202
context 'SELinux disabled' do
203203
let(:facts) do
204-
override_facts(super(), os: { selinux: { enabled: false } })
204+
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } })
205205
end
206206

207207
context 'make sure it compiles' do

spec/defines/selinux_permissive_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
context 'SELinux enabled' do
1515
let(:facts) do
16-
override_facts(super(), os: { selinux: { enabled: true } })
16+
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } })
1717
end
1818

1919
context 'ensure selinux_permissive oddjob_mkhomedir_t is present' do
@@ -54,7 +54,7 @@
5454

5555
context 'SELinux disabled' do
5656
let(:facts) do
57-
override_facts(super(), os: { selinux: { enabled: false } })
57+
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } })
5858
end
5959

6060
context 'make sure it compiles' do

spec/defines/selinux_port_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
on_supported_os.each do |os, os_facts|
99
context "on #{os}" do
1010
let(:facts) do
11-
override_facts(os_facts, os: { selinux: { enabled: true } })
11+
override_facts(os_facts, 'os' => { 'selinux' => { 'enabled' => true } })
1212
end
1313

1414
context 'ordering' do

spec/spec_helper.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
# Managed by modulesync - DO NOT EDIT
44
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
55

6-
RSpec.configure do |c|
7-
c.mock_with :mocha
8-
end
9-
106
# puppetlabs_spec_helper will set up coverage if the env variable is set.
117
# We want to do this if lib exists and it hasn't been explicitly set.
128
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))
139

1410
require 'voxpupuli/test/spec_helper'
1511

12+
RSpec.configure do |c|
13+
c.facterdb_string_keys = true
14+
c.mock_with :mocha
15+
end
16+
1617
add_mocked_facts!
1718

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

0 commit comments

Comments
 (0)