From af9def1dd93b1e1f9da978072acfa2e207883b83 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Mon, 1 Dec 2025 16:34:34 -0700 Subject: [PATCH] Update from voxpupuli modulesync_config --- .devcontainer/Dockerfile | 6 ---- .devcontainer/devcontainer.json | 17 ----------- .rspec_parallel => .github/labeler.yml | 4 ++- .github/release.yml | 42 ++++++++++++++++++++++++++ .github/workflows/ci.yml | 2 +- .github/workflows/labeler.yml | 22 ++++++++++++++ .github/workflows/pr_labels.yaml | 4 +-- .github/workflows/prepare_release.yml | 27 +++++++++++++++++ .github/workflows/release.yml | 8 +++-- .github/workflows/shellcheck.yaml | 15 --------- .github/workflows/yamllint.yaml | 2 +- .gitignore | 2 ++ .mdl_style.rb | 3 +- .msync.yml | 2 +- .overcommit.yml | 8 +++-- .pmtignore | 2 ++ .puppet-lint.rc | 3 ++ .rspec | 6 ---- .vscode/extensions.json | 6 ---- Gemfile | 12 +++----- REFERENCE.md | 2 +- Rakefile | 14 ++------- manifests/client.pp | 2 +- manifests/init.pp | 8 ++--- manifests/server.pp | 2 +- renovate.json | 7 +++++ spec/spec_helper.rb | 4 +++ 27 files changed, 144 insertions(+), 88 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json rename .rspec_parallel => .github/labeler.yml (63%) create mode 100644 .github/release.yml create mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/prepare_release.yml delete mode 100644 .github/workflows/shellcheck.yaml delete mode 100644 .rspec delete mode 100644 .vscode/extensions.json create mode 100644 renovate.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 12ed4ff1..00000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM puppet/pdk:latest - -# [Optional] Uncomment this section to install additional packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index cdd65d22..00000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "Puppet Development Kit (Community)", - "dockerFile": "Dockerfile", - - "settings": { - "terminal.integrated.profiles.linux": { - "bash": { - "path": "bash" - } - } - }, - - "extensions": [ - "puppet.puppet-vscode", - "rebornix.Ruby" - ] -} diff --git a/.rspec_parallel b/.github/labeler.yml similarity index 63% rename from .rspec_parallel rename to .github/labeler.yml index a9a84f85..f2d08d6b 100644 --- a/.rspec_parallel +++ b/.github/labeler.yml @@ -1,4 +1,6 @@ +--- # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ ---format progress +skip-changelog: + - head-branch: ['^release-*', 'release'] diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..f5b5d7a9 --- /dev/null +++ b/.github/release.yml @@ -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: + - "*" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da7bf9aa..96593cc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,4 +24,4 @@ jobs: name: Puppet uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v4 with: - beaker_hosts: master;replica;client + beaker_hosts: 'master;replica;client' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..bb37c93c --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,22 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +name: "Pull Request Labeler" + +# yamllint disable-line rule:truthy +on: + pull_request_target: {} + +permissions: + contents: read + pull-requests: write + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v6 diff --git a/.github/workflows/pr_labels.yaml b/.github/workflows/pr_labels.yaml index ea852052..9022ba8c 100644 --- a/.github/workflows/pr_labels.yaml +++ b/.github/workflows/pr_labels.yaml @@ -7,8 +7,8 @@ jobs: label: runs-on: "ubuntu-latest" steps: - - uses: "mheap/github-action-required-labels@v3" + - uses: "mheap/github-action-required-labels@v5" with: mode: "exactly" count: 1 - labels: "enhancement, bug, skip-changelog" + labels: "enhancement, bug, skip-changelog, backwards-incompatible, modulesync" diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml new file mode 100644 index 00000000..a93b7c2c --- /dev/null +++ b/.github/workflows/prepare_release.yml @@ -0,0 +1,27 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +name: 'Prepare Release' + +on: + workflow_dispatch: + inputs: + version: + description: 'Module version to be released. Must be a valid semver string without leading v. (1.2.3)' + required: false + +permissions: + contents: write + pull-requests: write + +jobs: + release_prep: + uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3' + with: + version: ${{ github.event.inputs.version }} + allowed_owner: 'lsst-it' + secrets: + # Configure secrets here: + # https://docs.github.com/en/actions/security-guides/encrypted-secrets + github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3153ba8d..19a29423 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,15 +4,19 @@ name: Release -"on": +# yamllint disable-line rule:truthy +on: push: tags: - '*' +permissions: + contents: write + jobs: release: name: Release - uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2 + uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3 with: allowed_owner: 'lsst-it' secrets: diff --git a/.github/workflows/shellcheck.yaml b/.github/workflows/shellcheck.yaml deleted file mode 100644 index 0c345d10..00000000 --- a/.github/workflows/shellcheck.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# yamllint disable rule:quoted-strings -name: shellcheck - -"on": - - push - -jobs: - shellcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml index d0cba14d..2d061ec6 100644 --- a/.github/workflows/yamllint.yaml +++ b/.github/workflows/yamllint.yaml @@ -9,7 +9,7 @@ jobs: yamllint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Run yamllint uses: bewuethr/yamllint-action@v1 diff --git a/.gitignore b/.gitignore index 84fd904c..adea1b01 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ .*.sw? /.yardoc/ /Guardfile +bolt-debug.log +.rerun.json diff --git a/.mdl_style.rb b/.mdl_style.rb index 55e6b1e9..d524fcb7 100644 --- a/.mdl_style.rb +++ b/.mdl_style.rb @@ -4,5 +4,6 @@ rule "MD013", :code_blocks => false exclude_rule "MD003" exclude_rule "MD013" -exclude_rule "MD036" +exclude_rule "MD024" exclude_rule "MD034" +exclude_rule "MD036" diff --git a/.msync.yml b/.msync.yml index 76cd4646..81ea369a 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '7.1.0' +modulesync_config_version: '10.4.0' diff --git a/.overcommit.yml b/.overcommit.yml index d367adae..4ed994cc 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -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: diff --git a/.pmtignore b/.pmtignore index 58a04088..a9d37aa0 100644 --- a/.pmtignore +++ b/.pmtignore @@ -20,6 +20,7 @@ /.github/ /.librarian/ /Puppetfile.lock +/Puppetfile *.iml /.editorconfig /.fixtures.yml @@ -35,3 +36,4 @@ /.yardoc/ /.yardopts /Dockerfile +/HISTORY.md diff --git a/.puppet-lint.rc b/.puppet-lint.rc index 02a3e71d..37817b67 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -1 +1,4 @@ +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + --fail-on-warnings diff --git a/.rspec b/.rspec deleted file mode 100644 index c6cfef19..00000000 --- a/.rspec +++ /dev/null @@ -1,6 +0,0 @@ -# Managed by modulesync - DO NOT EDIT -# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ - ---format documentation ---color ---fail-fast diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 2f1e4f73..00000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "recommendations": [ - "puppet.puppet-vscode", - "rebornix.Ruby" - ] -} diff --git a/Gemfile b/Gemfile index f59e0788..56259860 100644 --- a/Gemfile +++ b/Gemfile @@ -4,9 +4,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 7.0', :require => false - gem 'coveralls', :require => false - gem 'simplecov-console', :require => false + gem 'voxpupuli-test', '~> 13.0', :require => false gem 'puppet_metadata', '~> 5.0', :require => false end @@ -16,17 +14,15 @@ group :development do end group :system_tests do - gem 'voxpupuli-acceptance', '~> 2.2', :require => false + gem 'voxpupuli-acceptance', '~> 4.0', :require => false end group :release do - gem 'voxpupuli-release', '~> 3.0', :require => false + gem 'voxpupuli-release', '~> 5.0', :require => false end gem 'rake', :require => false -gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24' -gem 'puppet', puppetversion, :require => false, :groups => [:test] +gem 'openvox', ENV.fetch('OPENVOX_GEM_VERSION', [">= 7", "< 9"]), :require => false, :groups => [:test] # vim: syntax=ruby diff --git a/REFERENCE.md b/REFERENCE.md index 6d37cf9d..01c857ba 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -222,7 +222,7 @@ Default value: `(fqdn_rand('10737') + 10000` ##### `idmax` -Data type: `Variant[Integer,Undef]` +Data type: `Optional[Variant[Integer,Undef]]` (integer) From the IPA man pages: "The max value for the IDs range (default: idstart+199999)". diff --git a/Rakefile b/Rakefile index 620c2b6a..e162947e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,30 +1,22 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -# Attempt to load voxpupuli-test (which pulls in puppetlabs_spec_helper), -# otherwise attempt to load it directly. begin require 'voxpupuli/test/rake' rescue LoadError - begin - require 'puppetlabs_spec_helper/rake_tasks' - rescue LoadError - end + # only available if gem group test is installed end -# load optional tasks for acceptance -# only available if gem group releases is installed begin require 'voxpupuli/acceptance/rake' rescue LoadError + # only available if gem group acceptance is installed end -# load optional tasks for releases -# only available if gem group releases is installed begin require 'voxpupuli/release/rake_tasks' rescue LoadError - # voxpupuli-release not present + # only available if gem group releases is installed else GCGConfig.user = 'lsst-it' GCGConfig.project = 'puppet-ipa' diff --git a/manifests/client.pp b/manifests/client.pp index 914807aa..a6180dbf 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -9,7 +9,7 @@ # # @api private class ipa::client ( - Array[String] $package_name = undef, + Optional[Array[String]] $package_name = undef, Boolean $force_join = false, ) { assert_private() diff --git a/manifests/init.pp b/manifests/init.pp index e6b5e97a..70178cd8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -117,7 +117,7 @@ Boolean $enable_ip_address = false, Boolean $fixed_primary = false, Integer[10000] $idstart = (fqdn_rand('10737') + 10000), - Variant[Integer,Undef] $idmax = undef, + Optional[Variant[Integer,Undef]] $idmax = undef, Optional[Stdlib::IP::Address] $ip_address = undef, String $ipa_server_fqdn = fact('networking.fqdn'), Optional[Stdlib::Fqdn] $ipa_master_fqdn = undef, @@ -159,15 +159,15 @@ default: path => '/etc/login.defs', replace => true, - ; + ; 'adjust uid max': line => "UID_MAX\t${uid_max_value}", match => '^UID_MAX.*$', - ; + ; 'adjust gid max': line => "GID_MAX\t${gid_max_value}", match => '^GID_MAX.*$', - ; + ; } } diff --git a/manifests/server.pp b/manifests/server.pp index 80ede9c7..bc83544c 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -6,7 +6,7 @@ # # @api private class ipa::server ( - Array[String] $package_name = undef, + Optional[Array[String]] $package_name = undef, ) { assert_private() diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..d6b33cdc --- /dev/null +++ b/renovate.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "labels": ["enhancement"] +} diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9efb4ae6..58c9b66a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,6 +9,10 @@ require 'voxpupuli/test/spec_helper' +RSpec.configure do |c| + c.facterdb_string_keys = false +end + add_mocked_facts! if File.exist?(File.join(__dir__, 'default_module_facts.yml'))