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

modulesync 9.1.0 #388

Merged
merged 2 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,29 @@ You can install all needed gems for spec tests into the modules directory by
running:

```sh
bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)"
bundle config set --local path '.vendor/'
bundle config set --local without 'development system_tests release'
bundle install --jobs "$(nproc)"
```

If you also want to run acceptance tests:

```sh
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"
bundle config set --local path '.vendor/'
bundle config set --local without 'development release'
bundle config set --local with 'system_tests'
bundle install --jobs "$(nproc)"
```

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

```sh
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean
bundle config set --local path '.vendor/'
bundle config set --local without 'development release'
bundle config set --local with 'system_tests'
bundle install --jobs "$(nproc)"
bundle update
bundle clean
```

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

or

```sh
BEAKER_PUPPET_COLLECTION=none BEAKER_setfile=archlinux-64 bundle exec rake beaker
```

This latter example will use the distribution's own version of Puppet.

You can replace the string `debian11` with any common operating system.
The following strings are known to work:

* ubuntu2004
* ubuntu2204
* debian11
* centos7
* centos8
* debian12
* centos9
* archlinux
* almalinux8
* almalinux9
* fedora36
Expand Down
5 changes: 3 additions & 2 deletions .rspec → .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format documentation
--color
skip-changelog:
- head-branch: ['^release-*', 'release']
42 changes: 42 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

changelog:
exclude:
labels:
- duplicate
- invalid
- modulesync
- question
- skip-changelog
- wont-fix
- wontfix

categories:
- title: Breaking Changes 🛠
labels:
- backwards-incompatible

- title: New Features 🎉
labels:
- enhancement

- title: Bug Fixes 🐛
labels:
- bug

- title: Documentation Updates 📚
labels:
- documentation
- docs

- title: Dependency Updates ⬆️
labels:
- dependencies

- title: Other Changes
labels:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check failure on line 1 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / Build failed

.github/workflows/ci.yml#L1

This run timed out after more than 35 days.
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

Expand All @@ -18,4 +18,4 @@
jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v1
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v2
17 changes: 17 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: "Pull Request Labeler"

on:
pull_request_target: {}

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ jobs:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}

create-github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- name: Create GitHub release
uses: voxpupuli/gha-create-a-github-release@v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
.*.sw?
/.yardoc/
/Guardfile
bolt-debug.log
.rerun.json
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '7.3.0'
modulesync_config_version: '9.1.0'
8 changes: 5 additions & 3 deletions .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ PreCommit:
enabled: true
description: 'Runs rubocop on modified files only'
command: ['bundle', 'exec', 'rubocop']
PuppetLint:
RakeTarget:
enabled: true
description: 'Runs puppet-lint on modified files only'
command: ['bundle', 'exec', 'puppet-lint']
description: 'Runs lint on modified files only'
targets:
- 'lint'
command: ['bundle', 'exec', 'rake']
YamlSyntax:
enabled: true
JsonSyntax:
Expand Down
3 changes: 3 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--fail-on-warnings
--no-anchor_resource-check
4 changes: 0 additions & 4 deletions .rspec_parallel

This file was deleted.

3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
spec/spec_helper.rb:
mock_with: ':mocha'
facterdb_string_keys: true
.puppet-lint.rc:
disabled_lint_checks:
- anchor_resource
enabled_lint_checks:
- parameter_documentation
- parameter_types
.github/workflows/ci.yml:
acceptance_tests: false
24 changes: 0 additions & 24 deletions Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'voxpupuli-test', '~> 9.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.5', :require => false
gem 'puppet_metadata', '~> 4.0', :require => false
end

group :development do
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/selinux_config_mode_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
context "on #{os}" do
context 'when in enforcing mode' do
let(:facts) do
override_facts(os_facts, os: { selinux: {
override_facts(os_facts, 'os' => { 'selinux' => {
'enabled' => true,
'enforced' => true,
'config_mode' => 'enforcing',
Expand Down Expand Up @@ -68,15 +68,15 @@
let(:facts) do
# Get a deep copy and then fully override the selinux facts
result = override_facts(os_facts)
result[:os]['selinux'] = { 'enabled' => false }
result['os']['selinux'] = { 'enabled' => false }
result
end

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

if os_facts[:osfamily] == 'Debian'
if os_facts['os']['family'] == 'Debian'
it { is_expected.to contain_exec('activate-selinux') }
else
it { is_expected.not_to contain_exec('activate-selinux') }
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/selinux_boolean_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

context 'SELinux enabled' do
let(:facts) do
override_facts(super(), os: { selinux: { enabled: true } })
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } })
end

['on', true, 'present'].each do |value|
Expand Down Expand Up @@ -56,7 +56,7 @@

context 'SELinux disabled' do
let(:facts) do
override_facts(super(), os: { selinux: { enabled: false } })
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } })
end

['on', true, 'present'].each do |value|
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/selinux_fcontext_equivalence_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

context 'SELinux enabled' do
let(:facts) do
override_facts(super(), os: { selinux: { enabled: true } })
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } })
end

context 'ordering on ensure => present' do
Expand Down Expand Up @@ -44,7 +44,7 @@

context 'SELinux disabled' do
let(:facts) do
override_facts(super(), os: { selinux: { enabled: false } })
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } })
end

context 'make sure it compiles' do
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/selinux_fcontext_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) do
override_facts(os_facts, os: { selinux: { enabled: true } })
override_facts(os_facts, 'os' => { 'selinux' => { 'enabled' => true } })
end

context 'ordering' do
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/selinux_module_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

context 'SELinux enabled' do
let(:facts) do
override_facts(super(), os: { selinux: { enabled: true } })
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } })
end

context 'ordering' do
Expand Down Expand Up @@ -201,7 +201,7 @@

context 'SELinux disabled' do
let(:facts) do
override_facts(super(), os: { selinux: { enabled: false } })
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } })
end

context 'make sure it compiles' do
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/selinux_permissive_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

context 'SELinux enabled' do
let(:facts) do
override_facts(super(), os: { selinux: { enabled: true } })
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => true } })
end

context 'ensure selinux_permissive oddjob_mkhomedir_t is present' do
Expand Down Expand Up @@ -54,7 +54,7 @@

context 'SELinux disabled' do
let(:facts) do
override_facts(super(), os: { selinux: { enabled: false } })
override_facts(super(), 'os' => { 'selinux' => { 'enabled' => false } })
end

context 'make sure it compiles' do
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/selinux_port_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) do
override_facts(os_facts, os: { selinux: { enabled: true } })
override_facts(os_facts, 'os' => { 'selinux' => { 'enabled' => true } })
end

context 'ordering' do
Expand Down
9 changes: 5 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

RSpec.configure do |c|
c.mock_with :mocha
end

# puppetlabs_spec_helper will set up coverage if the env variable is set.
# We want to do this if lib exists and it hasn't been explicitly set.
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))

require 'voxpupuli/test/spec_helper'

RSpec.configure do |c|
c.facterdb_string_keys = true
c.mock_with :mocha
end

add_mocked_facts!

if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
Expand Down
Loading