From 0e0fa5243ed1970ca29910d8b55f7b724582f63f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 22:18:00 +0000 Subject: [PATCH 01/10] Bump faraday from 2.13.4 to 2.14.1 Bumps [faraday](https://github.com/lostisland/faraday) from 2.13.4 to 2.14.1. - [Release notes](https://github.com/lostisland/faraday/releases) - [Changelog](https://github.com/lostisland/faraday/blob/main/CHANGELOG.md) - [Commits](https://github.com/lostisland/faraday/compare/v2.13.4...v2.14.1) --- updated-dependencies: - dependency-name: faraday dependency-version: 2.14.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 379dfbf..f047223 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,14 +77,14 @@ GEM thor (>= 1.0.1, < 2.0) facterdb (3.9.0) jgrep (~> 1.5, >= 1.5.4) - faraday (2.13.4) + faraday (2.14.1) faraday-net_http (>= 2.0, < 3.5) json logger faraday-follow_redirects (0.3.0) faraday (>= 1, < 3) - faraday-net_http (3.4.1) - net-http (>= 0.5.0) + faraday-net_http (3.4.2) + net-http (~> 0.5) fast_gettext (2.4.0) prime ffi (1.17.2-x86_64-linux-gnu) @@ -98,7 +98,7 @@ GEM in-parallel (1.0.1) inifile (3.0.0) jgrep (1.5.4) - json (2.13.2) + json (2.18.1) json-schema (5.2.1) addressable (~> 2.8) bigdecimal (~> 3.1) @@ -116,8 +116,8 @@ GEM mocha (2.7.1) ruby2_keywords (>= 0.0.5) multi_json (1.17.0) - net-http (0.6.0) - uri + net-http (0.9.1) + uri (>= 0.11.1) net-scp (4.1.0) net-ssh (>= 2.6.5, < 8.0.0) net-ssh (7.3.0) @@ -288,7 +288,7 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (1.8.0) - uri (1.0.4) + uri (1.1.1) wisper (2.0.1) zeitwerk (2.7.3) From 9c40bcd7f382e9e92aaca20d1c2b7abe00c2c147 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 12:52:19 +0000 Subject: [PATCH 02/10] Bump json from 2.18.1 to 2.19.2 Bumps [json](https://github.com/ruby/json) from 2.18.1 to 2.19.2. - [Release notes](https://github.com/ruby/json/releases) - [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md) - [Commits](https://github.com/ruby/json/compare/v2.18.1...v2.19.2) --- updated-dependencies: - dependency-name: json dependency-version: 2.19.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f047223..89d8339 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,7 +98,7 @@ GEM in-parallel (1.0.1) inifile (3.0.0) jgrep (1.5.4) - json (2.18.1) + json (2.19.2) json-schema (5.2.1) addressable (~> 2.8) bigdecimal (~> 3.1) From 2b9730d6b903294bd92502036eec07f4a25f1e2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 09:59:08 +0000 Subject: [PATCH 03/10] Bump addressable from 2.8.7 to 2.9.0 Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.8.7 to 2.9.0. - [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md) - [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.8.7...addressable-2.9.0) --- updated-dependencies: - dependency-name: addressable dependency-version: 2.9.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 89d8339..5975724 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,8 +29,8 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) ansi (1.5.0) artii (2.1.2) ast (2.4.3) @@ -149,7 +149,7 @@ GEM forwardable singleton prism (1.4.0) - public_suffix (6.0.2) + public_suffix (7.0.5) puppet (7.34.0) concurrent-ruby (~> 1.0) deep_merge (~> 1.0) From 1c590f315a9fbac2f0ed6b59b8b95d4cfcbf77e1 Mon Sep 17 00:00:00 2001 From: ulhpc-bot <282622861+ULHPC-bot@users.noreply.github.com> Date: Thu, 7 May 2026 15:15:27 +0000 Subject: [PATCH 04/10] modulesync --- .devcontainer/devcontainer.json | 4 ++ .editorconfig | 15 +++++ .github/ISSUE_TEMPLATE.md | 26 +++++++++ .github/PULL_REQUEST_TEMPLATE.md | 20 +++++++ .github/labeler.yml | 6 ++ .github/release.yml | 42 ++++++++++++++ .github/workflows/ci.yml | 25 ++++++++ .github/workflows/create_tag.yml | 22 +++++++ .github/workflows/labeler.yml | 22 +++++++ .github/workflows/prepare_release.yml | 30 ++++++++++ .github/workflows/release.yml | 28 +++++++++ .gitignore | 32 ++++++++--- .msync.yml | 5 ++ .overcommit.yml | 67 ++++++++++++++++++++++ .pmtignore | 41 +++++++++++++- .puppet-lint.rc | 6 ++ .rubocop.yml | 6 ++ .ruby-version | 1 - Gemfile | 52 +++++++---------- Rakefile | 82 +++++++++------------------ spec/spec_helper.rb | 24 ++++++++ 21 files changed, 460 insertions(+), 96 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .editorconfig create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/labeler.yml create mode 100644 .github/release.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/create_tag.yml create mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/prepare_release.yml create mode 100644 .github/workflows/release.yml create mode 100644 .msync.yml create mode 100644 .overcommit.yml create mode 100644 .puppet-lint.rc create mode 100644 .rubocop.yml delete mode 100644 .ruby-version create mode 100644 spec/spec_helper.rb diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..08c6abf --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "VoxBox", + "image": "ghcr.io/voxpupuli/voxbox:latest" +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ecb10a8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# editorconfig.org + +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +tab_width = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..593e7aa --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,26 @@ + + +## Affected Puppet, Ruby, OS and module versions/distributions + +- Puppet: +- Ruby: +- Distribution: +- Module version: + +## How to reproduce (e.g Puppet code you use) + +## What are you seeing + +## What behaviour did you expect instead + +## Output log + +## Any additional information you'd like to impart diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..342807b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ + +#### Pull Request (PR) description + + +#### This Pull Request (PR) fixes the following issues + diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..f2d08d6 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,6 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +skip-changelog: + - head-branch: ['^release-*', 'release'] diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..f5b5d7a --- /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 new file mode 100644 index 0000000..9680f3d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +name: CI + +# yamllint disable-line rule:truthy +on: + pull_request: {} + push: + branches: + - main + - master + +concurrency: + group: ${{ github.ref_name }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + puppet: + name: Puppet + uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v4 diff --git a/.github/workflows/create_tag.yml b/.github/workflows/create_tag.yml new file mode 100644 index 0000000..27bffb5 --- /dev/null +++ b/.github/workflows/create_tag.yml @@ -0,0 +1,22 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +name: Create Git tag + +on: + workflow_dispatch: + +permissions: {} + +jobs: + create_tag: + uses: 'voxpupuli/gha-puppet/.github/workflows/create_tag.yml@v4' + with: + allowed_owner: 'ULHPC' + git_name: 'ulhpc-bot' + git_email: '282622861+ULHPC-bot@users.noreply.github.com' + secrets: + # Configure secrets here: + # https://docs.github.com/en/actions/security-guides/encrypted-secrets + ssh_private_key: ${{ secrets.PCCI_SSH_PRIVATE_KEY }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..eacd0b3 --- /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@v5 diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml new file mode 100644 index 0000000..3932ce4 --- /dev/null +++ b/.github/workflows/prepare_release.yml @@ -0,0 +1,30 @@ +--- +# 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@v4' + with: + version: ${{ github.event.inputs.version }} + allowed_owner: 'ULHPC' + git_name: 'ulphc-bot' + git_email: '282622861+ULHPC-bot@users.noreply.github.com' + secrets: + # Configure secrets here: + # https://docs.github.com/en/actions/security-guides/encrypted-secrets + github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}' + ssh_private_key: '${{ secrets.PCCI_SSH_PRIVATE_KEY }}' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6f7b711 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +name: Release + +# yamllint disable-line rule:truthy +on: + push: + tags: + # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushbranchestagsbranches-ignoretags-ignore + # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#filter-pattern-cheat-sheet + - 'v[0-9]+.[0-9]+.[0-9]+' + +permissions: + contents: write + +jobs: + release: + name: Release + uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v4 + with: + allowed_owner: 'ULHPC' + secrets: + # Configure secrets here: + # https://docs.github.com/en/actions/security-guides/encrypted-secrets + username: ${{ secrets.PUPPET_FORGE_USERNAME }} + api_key: ${{ secrets.PUPPET_FORGE_API_KEY }} diff --git a/.gitignore b/.gitignore index e1eaf51..adea1b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,25 @@ -.DS_Store -.vagrant -/.bundle/* -.ruby-* -.falkorlib.yaml -/pkg/* -/site/* +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +/pkg/ +/Gemfile.lock +/Gemfile.local +/vendor/ +/.vendor/ +/spec/fixtures/manifests/ +/spec/fixtures/modules/ +/.vagrant/ +/.bundle/ +/.ruby-version +/coverage/ +/log/ +/.idea/ +/.dependencies/ +/.librarian/ +/Puppetfile.lock +*.iml +.*.sw? +/.yardoc/ +/Guardfile +bolt-debug.log +.rerun.json diff --git a/.msync.yml b/.msync.yml new file mode 100644 index 0000000..bfb9bee --- /dev/null +++ b/.msync.yml @@ -0,0 +1,5 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +modulesync_config_version: '10.8.0' diff --git a/.overcommit.yml b/.overcommit.yml new file mode 100644 index 0000000..4ed994c --- /dev/null +++ b/.overcommit.yml @@ -0,0 +1,67 @@ +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ +# +# Hooks are only enabled if you take action. +# +# To enable the hooks run: +# +# ``` +# bundle exec overcommit --install +# # ensure .overcommit.yml does not harm to you and then +# bundle exec overcommit --sign +# ``` +# +# (it will manage the .git/hooks directory): +# +# Examples howto skip a test for a commit or push: +# +# ``` +# SKIP=RuboCop git commit +# SKIP=PuppetLint git commit +# SKIP=RakeTask git push +# ``` +# +# Don't invoke overcommit at all: +# +# ``` +# OVERCOMMIT_DISABLE=1 git commit +# ``` +# +# Read more about overcommit: https://github.com/brigade/overcommit +# +# To manage this config yourself in your module add +# +# ``` +# .overcommit.yml: +# unmanaged: true +# ``` +# +# to your modules .sync.yml config +--- +PreCommit: + RuboCop: + enabled: true + description: 'Runs rubocop on modified files only' + command: ['bundle', 'exec', 'rubocop'] + RakeTarget: + enabled: true + description: 'Runs lint on modified files only' + targets: + - 'lint' + command: ['bundle', 'exec', 'rake'] + YamlSyntax: + enabled: true + JsonSyntax: + enabled: true + TrailingWhitespace: + enabled: true + +PrePush: + RakeTarget: + enabled: true + description: 'Run rake targets' + targets: + - 'validate' + - 'test' + - 'rubocop' + command: ['bundle', 'exec', 'rake'] diff --git a/.pmtignore b/.pmtignore index 3843c63..a9d37aa 100644 --- a/.pmtignore +++ b/.pmtignore @@ -1,2 +1,39 @@ -docs/ -site/ +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +/docs/ +/pkg/ +/Gemfile +/Gemfile.lock +/Gemfile.local +/vendor/ +/.vendor/ +/spec/ +/Rakefile +/.vagrant/ +/.bundle/ +/.ruby-version +/coverage/ +/log/ +/.idea/ +/.dependencies/ +/.github/ +/.librarian/ +/Puppetfile.lock +/Puppetfile +*.iml +/.editorconfig +/.fixtures.yml +/.gitignore +/.msync.yml +/.overcommit.yml +/.pmtignore +/.rspec +/.rspec_parallel +/.rubocop.yml +/.sync.yml +.*.sw? +/.yardoc/ +/.yardopts +/Dockerfile +/HISTORY.md diff --git a/.puppet-lint.rc b/.puppet-lint.rc new file mode 100644 index 0000000..05d28a2 --- /dev/null +++ b/.puppet-lint.rc @@ -0,0 +1,6 @@ +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +--fail-on-warnings +--no-parameter_documentation-check +--no-parameter_types-check diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..53ac189 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,6 @@ +--- +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +inherit_gem: + voxpupuli-test: rubocop.yml diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 351227f..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.2.4 diff --git a/Gemfile b/Gemfile index 1878b3f..1283982 100644 --- a/Gemfile +++ b/Gemfile @@ -1,38 +1,28 @@ -# A sample Gemfile -source "https://rubygems.org" +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -gem 'falkorlib', git: 'https://github.com/Falkor/falkorlib.git', ref: 'ed25efb' - -gem 'puppet-syntax', '< 6.0.0' +source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem "rake" - gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 7' - gem "pdk" - gem "rspec", '< 3.2.0' - gem "rspec-puppet" - gem "puppetlabs_spec_helper" - gem "metadata-json-lint" - gem "rspec-puppet-facts" - gem 'rubocop', '~> 0.51' - gem 'simplecov', '>= 0.11.0' - gem 'simplecov-console' - - #gem 'puppet-lint', '>= 0.3.2' - gem "puppet-lint-absolute_classname-check" - gem "puppet-lint-leading_zero-check" - gem "puppet-lint-trailing_comma-check" - gem "puppet-lint-version_comparison-check" - gem "puppet-lint-classes_and_types_beginning_with_digits-check" - gem "puppet-lint-unquoted_string-check" - gem 'puppet-lint-resource_reference_syntax' - gem 'semantic_puppet' - - gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0' + gem 'voxpupuli-test', '~> 14.0', :require => false + gem 'puppet_metadata', '~> 6.1', :require => false +end + +group :development do + gem 'guard-rake', :require => false + gem 'overcommit', '>= 0.39.1', :require => false end group :system_tests do - gem "beaker", '~> 6.1.0' - gem "beaker-rspec" - gem "beaker-puppet_install_helper" + gem 'voxpupuli-acceptance', '~> 4.4', :require => false +end + +group :release do + gem 'voxpupuli-release', '~> 5.3', :require => false end + +gem 'rake', :require => false + +gem 'openvox', ENV.fetch('OPENVOX_GEM_VERSION', [">= 7", "< 9"]), :require => false, :groups => [:test] + +# vim: syntax=ruby diff --git a/Rakefile b/Rakefile index 6cc925b..34b83b0 100644 --- a/Rakefile +++ b/Rakefile @@ -1,64 +1,36 @@ -############################################################################## -# Rakefile - Configuration file for rake (http://rake.rubyforge.org/) -# Time-stamp: -# -# Copyright (c) 2017 UL HPC Team -# ____ _ __ _ _ -# | _ \ __ _| | _____ / _(_) | ___ -# | |_) / _` | |/ / _ \ |_| | |/ _ \ -# | _ < (_| | < __/ _| | | __/ -# |_| \_\__,_|_|\_\___|_| |_|_|\___| -# -# Use 'rake -T' to list the available actions -# -# Resources: -# * http://www.stuartellis.eu/articles/rake/ -# -# See also https://github.com/garethr/puppet-module-skeleton -############################################################################## -require 'falkorlib' -#require 'puppetlabs_spec_helper/rake_tasks' +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -## placeholder for custom configuration of FalkorLib.config.* -## See https://github.com/Falkor/falkorlib - -# Adapt the versioning aspects -FalkorLib.config.versioning do |c| - c[:type] = 'puppet_module' +begin + require 'voxpupuli/test/rake' +rescue LoadError + # only available if gem group test is installed end -# Adapt the Git flow aspects -FalkorLib.config.gitflow do |c| - c[:branches] = { - :master => 'production', - :develop => 'devel' - } +begin + require 'voxpupuli/acceptance/rake' +rescue LoadError + # only available if gem group acceptance is installed end -require 'falkorlib/tasks/git' -require 'falkorlib/tasks/puppet' - -Rake::Task['puppet:module:build'].clear +begin + require 'voxpupuli/release/rake_tasks' +rescue LoadError + # only available if gem group releases is installed +else + GCGConfig.user = 'ULHPC' + GCGConfig.project = 'puppet-sudo' +end -namespace :puppet do - namespace :module do - ########### puppet:module:build ########### - desc "Build the puppet module to publish it on the Puppet Forge" - task :build do |t| - info(t.comment).to_s - run %( pdk build --force) - if File.exist?('metadata.json') - metadata = JSON.parse( IO.read( 'metadata.json' ) ) - name = metadata["name"] - version = metadata["version"] - run %( gunzip pkg/#{name}-#{version}.tar.gz) - run %( tar --numeric-owner -rvf pkg/#{name}-#{version}.tar --transform='s,^,#{name}-#{version}/,' metadata.json) - run %( gzip pkg/#{name}-#{version}.tar) - end - end # task build +desc "Run main 'test' task and report merged results to coveralls" +task test_with_coveralls: [:test] do + if Dir.exist?(File.expand_path('../lib', __FILE__)) + require 'coveralls/rake/task' + Coveralls::RakeTask.new + Rake::Task['coveralls:push'].invoke + else + puts 'Skipping reporting to coveralls. Module has no lib dir' end end -############################################################################## -#TOP_SRCDIR = File.expand_path(File.join(File.dirname(__FILE__), ".")) - +# vim: syntax=ruby diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..58c9b66 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# Managed by modulesync - DO NOT EDIT +# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ + +# 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 = false +end + +add_mocked_facts! + +if File.exist?(File.join(__dir__, 'default_module_facts.yml')) + facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) + facts&.each do |name, value| + add_custom_fact name.to_sym, value + end +end +Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } From 2cfd2a176a875134c1ff5b78ab49609c1884b330 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 15:34:48 +0200 Subject: [PATCH 05/10] docs: use original GPL-3.0 text in the LICENSE file --- LICENSE | 70 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 13 deletions(-) diff --git a/LICENSE b/LICENSE index 062b48e..f288702 100644 --- a/LICENSE +++ b/LICENSE @@ -1,18 +1,7 @@ -Copyright (C) 2014 S. Varrette - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -627,4 +616,59 @@ above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. \ No newline at end of file +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 4d74a8fb87ba42bb3f4bf353e3589eea626d1aad Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 15:42:27 +0200 Subject: [PATCH 06/10] refactor: remove obsoleted files --- .ruby-gemset | 1 - Gemfile.lock | 325 -------------------------- Vagrantfile | 140 ----------- docs/contacts.md | 5 - docs/contributing/index.md | 14 -- docs/contributing/layout.md | 32 --- docs/contributing/setup.md | 52 ----- docs/contributing/versioning.md | 30 --- docs/index.md | 30 --- docs/overview.md | 1 - docs/rtfd.md | 9 - docs/vagrant.md | 79 ------- mkdocs.yml | 13 -- tests/alias/command.pp | 16 -- tests/alias/host.pp | 27 --- tests/alias/user.pp | 18 -- tests/defaults/spec.pp | 21 -- tests/directive.pp | 21 -- tests/init.pp | 27 --- tests/params.pp | 38 --- tests/vagrant/bootstrap.sh | 229 ------------------ tests/vagrant/config.yaml | 51 ---- tests/vagrant/puppet_modules_setup.rb | 74 ------ 23 files changed, 1253 deletions(-) delete mode 100644 .ruby-gemset delete mode 100644 Gemfile.lock delete mode 100644 Vagrantfile delete mode 100644 docs/contacts.md delete mode 100644 docs/contributing/index.md delete mode 100644 docs/contributing/layout.md delete mode 100644 docs/contributing/setup.md delete mode 100644 docs/contributing/versioning.md delete mode 100644 docs/index.md delete mode 120000 docs/overview.md delete mode 100644 docs/rtfd.md delete mode 100644 docs/vagrant.md delete mode 100644 mkdocs.yml delete mode 100644 tests/alias/command.pp delete mode 100644 tests/alias/host.pp delete mode 100644 tests/alias/user.pp delete mode 100644 tests/defaults/spec.pp delete mode 100644 tests/directive.pp delete mode 100644 tests/init.pp delete mode 100644 tests/params.pp delete mode 100644 tests/vagrant/bootstrap.sh delete mode 100644 tests/vagrant/config.yaml delete mode 100644 tests/vagrant/puppet_modules_setup.rb diff --git a/.ruby-gemset b/.ruby-gemset deleted file mode 100644 index 17cb753..0000000 --- a/.ruby-gemset +++ /dev/null @@ -1 +0,0 @@ -puppet diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 5975724..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,325 +0,0 @@ -GIT - remote: https://github.com/Falkor/falkorlib.git - revision: ed25efbf2d98685bf2fc9d61d0ff2f14ef8e7cc8 - ref: ed25efb - specs: - falkorlib (0.9.1) - activesupport (~> 6.1, >= 6.1.7.5) - artii (~> 2.1, >= 2.1.2) - awesome_print (~> 1.9, >= 1.9.2) - configatron (~> 3.0) - deep_merge (~> 1.0) - diffy (~> 3.4, >= 3.4.2) - facter (~> 4.6.1) - git_remote_branch (~> 0) - json (~> 2.6, >= 2.6.3) - license-generator (~> 0) - logger (~> 1.6) - minigit (~> 0) - rake (~> 13.1) - term-ansicolor (> 1.3) - thor (~> 1.3) - -GEM - remote: https://rubygems.org/ - specs: - activesupport (6.1.7.10) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.9.0) - public_suffix (>= 2.0.2, < 8.0) - ansi (1.5.0) - artii (2.1.2) - ast (2.4.3) - awesome_print (1.9.2) - base64 (0.3.0) - bcrypt_pbkdf (1.1.1) - beaker (6.1.0) - bcrypt_pbkdf (>= 1.0, < 2.0) - beaker-hostgenerator (~> 2.0) - ed25519 (>= 1.2, < 2.0) - hocon (~> 1.0) - in-parallel (>= 0.1, < 2.0) - inifile (~> 3.0) - minitar (~> 0.6) - minitest (~> 5.4) - net-scp (>= 1.2, < 5.0) - net-ssh (~> 7.1) - rexml (~> 3.2, >= 3.2.5) - rsync (~> 1.0.9) - stringify-hash (~> 0.0) - thor (>= 1.0.1, < 2.0) - beaker-hostgenerator (2.24.0) - deep_merge (~> 1.0) - beaker-puppet_install_helper (0.9.4) - beaker (>= 2.0) - beaker-rspec (8.3.0) - beaker (>= 4.0, < 7) - rspec (~> 3.0) - serverspec (~> 2) - specinfra (~> 2) - bigdecimal (3.2.2) - childprocess (5.1.0) - logger (~> 1.5) - concurrent-ruby (1.3.5) - configatron (3.2.0) - cri (2.15.12) - deep_merge (1.2.2) - diff-lcs (1.6.2) - diffy (3.4.4) - docile (1.4.1) - ed25519 (1.4.0) - facter (4.6.1) - hocon (~> 1.3) - thor (>= 1.0.1, < 2.0) - facterdb (3.9.0) - jgrep (~> 1.5, >= 1.5.4) - faraday (2.14.1) - faraday-net_http (>= 2.0, < 3.5) - json - logger - faraday-follow_redirects (0.3.0) - faraday (>= 1, < 3) - faraday-net_http (3.4.2) - net-http (~> 0.5) - fast_gettext (2.4.0) - prime - ffi (1.17.2-x86_64-linux-gnu) - forwardable (1.3.3) - git_remote_branch (0.3.8) - hiera (3.12.0) - hitimes (2.0.0) - hocon (1.4.0) - i18n (1.14.7) - concurrent-ruby (~> 1.0) - in-parallel (1.0.1) - inifile (3.0.0) - jgrep (1.5.4) - json (2.19.2) - json-schema (5.2.1) - addressable (~> 2.8) - bigdecimal (~> 3.1) - license-generator (0.4.1) - thor - locale (2.1.4) - logger (1.7.0) - metadata-json-lint (4.2.1) - json-schema (>= 2.8, < 6.0) - semantic_puppet (~> 1.0) - spdx-licenses (~> 1.0) - minigit (0.0.4) - minitar (0.12.1) - minitest (5.25.5) - mocha (2.7.1) - ruby2_keywords (>= 0.0.5) - multi_json (1.17.0) - net-http (0.9.1) - uri (>= 0.11.1) - net-scp (4.1.0) - net-ssh (>= 2.6.5, < 8.0.0) - net-ssh (7.3.0) - net-telnet (0.2.0) - parallel (1.27.0) - parser (3.3.9.0) - ast (~> 2.4.1) - racc - pastel (0.8.0) - tty-color (~> 0.5) - pathspec (1.1.3) - pdk (3.4.0) - bundler (>= 2.1.0, < 3.0.0) - childprocess (~> 5.0) - cri (~> 2.15.11) - deep_merge (~> 1.2.2) - diff-lcs (>= 1.5.0) - ffi (>= 1.15.5, < 2.0.0) - hitimes (= 2.0.0) - json-schema (~> 5.0) - minitar (~> 0.8) - pathspec (~> 1.1) - puppet-modulebuilder (~> 1.0) - puppet_forge (~> 5.0) - tty-prompt (~> 0.23) - tty-spinner (~> 0.9) - tty-which (~> 0.5) - prime (0.1.4) - forwardable - singleton - prism (1.4.0) - public_suffix (7.0.5) - puppet (7.34.0) - concurrent-ruby (~> 1.0) - deep_merge (~> 1.0) - facter (> 2.0.1, < 5) - fast_gettext (>= 1.1, < 3) - hiera (>= 3.2.1, < 4) - locale (~> 2.1) - multi_json (~> 1.10) - puppet-resource_api (~> 1.5) - scanf (~> 1.0) - semantic_puppet (~> 1.0) - puppet-lint (2.5.2) - puppet-lint-absolute_classname-check (3.1.0) - puppet-lint (>= 1.0, < 4) - puppet-lint-classes_and_types_beginning_with_digits-check (1.0.0) - puppet-lint (>= 1.0, < 3.0) - puppet-lint-leading_zero-check (1.1.0) - puppet-lint (>= 1.0, < 4.0) - puppet-lint-resource_reference_syntax (1.2.0) - puppet-lint (>= 1.0, < 4) - puppet-lint-trailing_comma-check (1.0.0) - puppet-lint (>= 1.0, < 4) - puppet-lint-unquoted_string-check (2.2.0) - puppet-lint (>= 2.1, < 4) - puppet-lint-version_comparison-check (1.1.0) - puppet-lint (>= 1.0, < 4) - puppet-modulebuilder (1.1.0) - minitar (~> 0.9) - pathspec (>= 0.2.1, < 3.0.0) - puppet-resource_api (1.9.0) - hocon (>= 1.0) - puppet-syntax (5.0.0) - puppet (>= 7, < 9) - rake (~> 13.1) - puppet_forge (5.0.4) - faraday (~> 2.0) - faraday-follow_redirects (~> 0.3.0) - minitar (< 1.0.0) - semantic_puppet (~> 1.0) - puppetlabs_spec_helper (1.1.1) - mocha - puppet-lint - puppet-syntax - rake - rspec-puppet - racc (1.8.1) - rainbow (3.1.1) - rake (13.3.0) - regexp_parser (2.11.0) - rexml (3.4.2) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-its (1.3.1) - rspec-core (>= 3.0.0) - rspec-expectations (>= 3.0.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-puppet (5.0.0) - rspec (~> 3.0) - rspec-puppet-facts (5.4.0) - deep_merge (~> 1.2) - facter (< 5) - facterdb (~> 3.1) - rspec-support (3.1.2) - rsync (1.0.9) - rubocop (0.93.1) - parallel (~> 1.10) - parser (>= 2.7.1.5) - rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8) - rexml - rubocop-ast (>= 0.6.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.46.0) - parser (>= 3.3.7.2) - prism (~> 1.4) - ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) - scanf (1.0.0) - semantic_puppet (1.1.1) - serverspec (2.43.0) - multi_json - rspec (~> 3.0) - rspec-its - specinfra (~> 2.72) - sfl (2.3) - simplecov (0.22.0) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov_json_formatter (~> 0.1) - simplecov-console (0.9.4) - ansi - simplecov - terminal-table - simplecov-html (0.13.2) - simplecov_json_formatter (0.1.4) - singleton (0.3.0) - spdx-licenses (1.3.0) - specinfra (2.94.1) - base64 - net-scp - net-ssh (>= 2.7) - net-telnet - sfl - stringify-hash (0.0.2) - sync (0.5.0) - term-ansicolor (1.11.2) - tins (~> 1.0) - terminal-table (4.0.0) - unicode-display_width (>= 1.1.1, < 4) - thor (1.4.0) - tins (1.39.1) - bigdecimal - sync - tty-color (0.6.0) - tty-cursor (0.7.1) - tty-prompt (0.23.1) - pastel (~> 0.8) - tty-reader (~> 0.8) - tty-reader (0.9.0) - tty-cursor (~> 0.7) - tty-screen (~> 0.8) - wisper (~> 2.0) - tty-screen (0.8.2) - tty-spinner (0.9.3) - tty-cursor (~> 0.7) - tty-which (0.5.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (1.8.0) - uri (1.1.1) - wisper (2.0.1) - zeitwerk (2.7.3) - -PLATFORMS - x86_64-linux - -DEPENDENCIES - beaker (~> 6.1.0) - beaker-puppet_install_helper - beaker-rspec - falkorlib! - metadata-json-lint - pdk - puppet (~> 7) - puppet-lint-absolute_classname-check - puppet-lint-classes_and_types_beginning_with_digits-check - puppet-lint-leading_zero-check - puppet-lint-resource_reference_syntax - puppet-lint-trailing_comma-check - puppet-lint-unquoted_string-check - puppet-lint-version_comparison-check - puppet-syntax (< 6.0.0) - puppetlabs_spec_helper - rake - rspec (< 3.2.0) - rspec-puppet - rspec-puppet-facts - rubocop (~> 0.51) - semantic_puppet - simplecov (>= 0.11.0) - simplecov-console - -BUNDLED WITH - 2.4.19 diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 0981c9b..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,140 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : -# Time-stamp: -########################################################################################### -# __ __ _ __ _ _ -# \ \ / /_ _ __ _ _ __ __ _ _ __ | |_ / _(_) | ___ -# \ \ / / _` |/ _` | '__/ _` | '_ \| __| |_| | |/ _ \ -# \ V / (_| | (_| | | | (_| | | | | |_| _| | | __/ -# \_/ \__,_|\__, |_| \__,_|_| |_|\__|_| |_|_|\___| -# |___/ -########################################################################################### -require 'yaml' -require 'ipaddr' -require 'deep_merge' - -# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! -VAGRANTFILE_API_VERSION = "2" -TOP_SRCDIR = File.expand_path File.dirname(__FILE__) -TOP_VAGRANT_TESTDIR = File.join(TOP_SRCDIR, 'tests', 'vagrant') -config_file = File.join(TOP_VAGRANT_TESTDIR, 'config.yaml') - -###### Expected Vagrant plugins detection ###### -# For more information on the below plugins: -# - https://github.com/oscar-stack/vagrant-hosts -# - https://github.com/dotless-de/vagrant-vbguest -# - https://github.com/emyl/vagrant-triggers -# - https://github.com/fgrehm/vagrant-cachier -# Terminal-table is a nice ruby gem for automatically print tables with nice layout -### -[ 'vagrant-hosts', 'vagrant-vbguest', 'vagrant-triggers', 'vagrant-cachier', 'terminal-table' ].each do |plugin| - abort "Install the '#{plugin}' plugin with 'vagrant plugin install #{plugin}'" unless Vagrant.has_plugin?("#{plugin}") -end -require 'terminal-table' - -### Default settings ### -DEFAULT_SETTINGS = { - :defaults => { - :os => :centos7, - :ram => 512, - :vcpus => 4, - :vbguest_auto_update => true, - }, - # Default domain settings - :network => { - :domain => 'vagrant.dev', - :range => '10.10.1.0/24', - :ip_offset => 10, - }, - # Default Boxes - :boxes => { - :centos7 => 'centos/7', - :debian8 => 'debian/contrib-jessie64', - :ubuntu14 => 'ubuntu/trusty64' - }, - :vms => { - 'default' => { } - }, -} - -# List of default provisioning scripts -DEFAULT_PROVISIONING_SCRIPTS = [ - "tests/vagrant/bootstrap.sh", - "tests/vagrant/puppet_modules_setup.rb" -] - -# Load the settings (eventually overwritten using values from the yaml file 'config.yaml') -settings = DEFAULT_SETTINGS.clone -if File.exist?(config_file) - config = YAML::load_file config_file - settings.deep_merge!( config ) if config -end -abort "Undefined settings" if settings.nil? - - -############################################################ -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - defaults = settings[:defaults] - network = settings[:network] - - ### Common configs shared by all VMs ### - # Cache plugin -- Supports local cache, so you don't wast bandwitdh - # vagrant plugin install vagrant-cachier # see https://github.com/fgrehm/vagrant-cachier - config.cache.auto_detect = true if Vagrant.has_plugin?("vagrant-cachier") - - # check if VirtualBox Guest Additions are up to date - if Vagrant.has_plugin?("vagrant-vbguest") - # set auto_update to false, if you do NOT want to check the correct - # additions version when booting these boxes - config.vbguest.auto_update = defaults[:vbguest_auto_update] - end - - # Shell provisioner, to setup minimal conditions for Puppet provisioning - DEFAULT_PROVISIONING_SCRIPTS.each do |script| - config.vm.provision "shell", path: "#{script}", keep_color: true - end - config.vm.synced_folder ".", "/vagrant", type: "virtualbox" - - # network settings - ipaddr = IPAddr.new network[:range] - ip_range = ipaddr.to_range.to_a - - # cosmetics for the post-up message - __table = { - :title => "Puppet Testing infrastructure deployed on Vagrant", - :headings => [ 'Name', 'Hostname', 'OS', 'vCPU/RAM', 'Description', 'IP' ], - :rows => [], - } - #__________________________________ - settings[:vms].each do |name, node| - boxname = defaults[:os].to_s.downcase.gsub(/([^\d]+)(\d+)/, '\\1-\\2') - name = boxname if name == 'default' - hostname = node[:hostname] ? node[:hostname] : name - domain = network[:domain] - fqdn = "#{hostname}.#{domain}" - os = node[:os] ? node[:os].to_sym : defaults[:os].to_sym - ram = node[:ram] ? node[:ram] : defaults[:ram] - vcpus = node[:vcpus] ? node[:vcpus] : defaults[:vcpus] - desc = node[:desc] ? node[:desc] : 'n/a' - - abort "Non-existing box OS '#{os}' for the VM '#{name}'" if settings[:boxes][os.to_sym].nil? - abort "Empty IP address range" if ip_range.empty? - ip = ip_range[ network[:ip_offset].to_i ].to_s - - config.vm.define "#{name}" do |c| - c.vm.box = settings[:boxes][os.to_sym] - c.vm.hostname = "#{fqdn}" - c.vm.network :private_network, :ip => ip - c.vm.provision :hosts, :sync_hosts => true - c.vm.provider "virtualbox" do |v| - v.customize [ 'modifyvm', :id, '--name', hostname, '--memory', ram.to_s ] - v.customize [ 'modifyvm', :id, '--cpus', vcpus.to_s ] if vcpus.to_i > 1 - end - __table[:rows] << [ name, fqdn, os.to_sym, "#{vcpus}/#{ram}", desc, ip] - end - end - - config.trigger.after :up do - puts Terminal::Table.new __table - end -end diff --git a/docs/contacts.md b/docs/contacts.md deleted file mode 100644 index dfb1b6f..0000000 --- a/docs/contacts.md +++ /dev/null @@ -1,5 +0,0 @@ -This Puppet Module has been implemented in the context of the [UL HPC](http://hpc.uni.lu) Platform of the [University of Luxembourg](http://www.uni.lu). -More precisely, the [UL HPC Team](https://hpc.uni.lu/about/team.html#system-administrators) took care of the development for this module. - -You can submit bug / issues / feature request using the [ULHPC/sudo Puppet Module Tracker](https://github.com/ULHPC/puppet-sudo/issues). -Alternatively, you can contact them on the following email address: `hpc-sysadmins@uni.lu` diff --git a/docs/contributing/index.md b/docs/contributing/index.md deleted file mode 100644 index 5bbcaf5..0000000 --- a/docs/contributing/index.md +++ /dev/null @@ -1,14 +0,0 @@ -This project is released under the terms of the [Gpl-3.0 Licence](LICENSE). -So you are more than welcome to contribute to its development as follows: - -1. Fork it -2. Create your feature branch (`rake git:feature:start[]`) -3. Commit your changes (`git commit -am 'Added some feature'`) -4. Push to the branch (`git flow feature publish `) -5. Create new Pull Request - -This assumes that you have understood the [directory tree structure](layout.md) of this Puppet module. - -There is also a number of pre-requisite programs / framework you shall install to be able to correctly contribute to this Puppet module. This is detailed in the [Repository Setup and Developments](setup.md) page. - -Finally, you shall be aware of the way the [semantic versioning](versioning.md) procedure of this Puppet module are handled. diff --git a/docs/contributing/layout.md b/docs/contributing/layout.md deleted file mode 100644 index f5a665e..0000000 --- a/docs/contributing/layout.md +++ /dev/null @@ -1,32 +0,0 @@ -The directory hosting the implementation of this puppet module is organized as follows: - -``` -.gitignore # Git ignore file -.ruby-{version,gemset} # [RVM](https://rvm.io/) configuration -.vagrant_init.rb # Vagrant provisionner to test this module -├── Gemfile[.lock] # [Bundler](http://bundler.io/) configuration -├── LICENSE # Licence file -├── README.md # This file -├── Rakefile # Definition of the [rake](https://github.com/jimweirich/rake) tasks -├── Vagrantfile # Pilot Vagrant to test this module -├── docs/ # [Read the Docs](readthedocs.org) main directory -├── files/ # (eventually) Contains static files, which managed nodes can download -├── lib/ # (eventually) Custom facts/type/provider definitions -├── manifests/ -│   ├── init.pp # Main manifests file which defines the sudo class -│   ├── common/ -│   │   ├── debian.pp # Specific Debian setup for the main class -│   │   └── redhat.pp # Specific Redhat setup for the main class -│   ├── common.pp # Common class setup for all OS -│   ├── ... # Implementation of the other sudo::* classes / definitions -│   └── params.pp # Class parameters -├── metadata.json # Puppet module configuration file -- See http://tinyurl.com/puppet-metadata-json -├── mkdocs.yml # [Read the Docs](readthedocs.org) configuration -├── pkg/ # Hold build packages to be published on the [Puppet forge](https://forge.puppetlabs.com/ULHPC/sudo) -├── spec/ # (eventually) [Rspec](https://www.relishapp.com/rspec/) tests -├── templates/ # (eventually) Module ERB template files -└── tests/ # Tests cases for the module usage -``` - -Globally, this module follows the [official PuppetLabs guidelines for the predictable directory tree structure of Puppet modules](http://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html#module-layout). - diff --git a/docs/contributing/setup.md b/docs/contributing/setup.md deleted file mode 100644 index 1a2a1b4..0000000 --- a/docs/contributing/setup.md +++ /dev/null @@ -1,52 +0,0 @@ -There is a number of pre-requisite programs / framework you shall install to be able to correctly contribute to this Puppet module. - -### Git Branching Model - -The Git branching model for this repository follows the guidelines of [gitflow](http://nvie.com/posts/a-successful-git-branching-model/). -In particular, the central repository holds two main branches with an infinite lifetime: - -* `production`: the branch holding tags of the successive releases of this tutorial -* `devel`: the main branch where the sources are in a state with the latest delivered development changes for the next release. This is the *default* branch you get when you clone the repository, and the one on which developments will take places. - -You should therefore install [git-flow](https://github.com/nvie/gitflow), and probably also its associated [bash completion](https://github.com/bobthecow/git-flow-completion). - -### Ruby, [RVM](https://rvm.io/) and [Bundler](http://bundler.io/) - -The various operations that can be conducted from this repository are piloted -from a `Rakefile` and assumes you have a running Ruby installation. - -The bootstrapping of your repository is based on [RVM](https://rvm.io/), **thus -ensure this tools are installed on your system** -- see -[installation notes](https://rvm.io/rvm/install). - -The ruby stuff part of this repository corresponds to the following files: - -* `.ruby-{version,gemset}`: [RVM](https://rvm.io/) configuration, use the name of the - project as [gemset](https://rvm.io/gemsets) name -* `Gemfile[.lock]`: used by `[bundle](http://bundler.io/)` - -### Repository Setup - -Then, to make your local copy of the repository ready to use the [git-flow](https://github.com/nvie/gitflow) workflow and the local [RVM](https://rvm.io/) setup, you have to run the following commands once you cloned it for the first time: - - $> gem install bundler # assuming it is not yet available - $> bundle install - $> rake -T # To list the available tasks - $> rake setup - -You probably wants to activate the bash-completion for rake tasks. -I personnaly use the one provided [here](https://github.com/ai/rake-completion) - -Also, some of the tasks are hidden. Run `rake -T -A` to list all of them. - -### RSpec tests - -A set of unitary tests are defined to validate the different function of my library using [Rspec](http://rspec.info/) - -You can run these tests by issuing: - - $> rake rspec # NOT YET IMPLEMENTED - -By conventions, you will find all the currently implemented tests in the `spec/` directory, in files having the `_spec.rb` suffix. This is expected from the `rspec` task of the `Rakefile`. - -**Important** Kindly stick to this convention, and feature tests for all definitions/classes/modules you might want to add. diff --git a/docs/contributing/versioning.md b/docs/contributing/versioning.md deleted file mode 100644 index b5d893c..0000000 --- a/docs/contributing/versioning.md +++ /dev/null @@ -1,30 +0,0 @@ -The operation consisting of releasing a new version of this repository is -automated by a set of tasks within the `Rakefile`. - -In this context, a version number have the following format: - - .. - -where: - -* `< major >` corresponds to the major version number -* `< minor >` corresponds to the minor version number -* `< patch >` corresponds to the patching version number - -Example: `1.2.0` - -The current version number is stored in the file `metadata.json`. -For more information on the version, run: - - $> rake version:info - -If a new version number such be bumped, you simply have to run: - - $> rake version:bump:{major,minor,patch} - -This will start the release process for you using `git-flow`. -Then, to make the release effective, just run: - - $> rake version:release - -This will finalize the release using `git-flow`, create the appropriate tag and merge all things the way they should be. diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 102798f..0000000 --- a/docs/index.md +++ /dev/null @@ -1,30 +0,0 @@ --*- mode: markdown; mode: visual-line; -*- - -# ULHPC-sudo Puppet Module - -[![Puppet Forge](http://img.shields.io/puppetforge/v/ULHPC/sudo.svg)](https://forge.puppetlabs.com/ULHPC/sudo) -[![License](http://img.shields.io/:license-GPL3.0-blue.svg)](LICENSE) -![Supported Platforms](http://img.shields.io/badge/platform-debian|redhat|centos-lightgrey.svg) -[![Documentation Status](https://readthedocs.org/projects/ulhpc-puppet-sudo/badge/?version=latest)](https://readthedocs.org/projects/ulhpc-puppet-sudo/?badge=latest) -[![By ULHPC](https://img.shields.io/badge/by-ULHPC-blue.svg)](http://hpc.uni.lu) - - Copyright (c) 2020 UL HPC Team - -| [Project Page](https://github.com/ULHPC/puppet-sudo) | [Documentation](http://ulhpc-puppet-sudo.readthedocs.org/en/latest/) | [Issues](https://github.com/ULHPC/puppet-sudo/issues) | - - ------------ -The [ULHPC-sudo](https://github.com/ULHPC/puppet-sudo) puppet module has been designed to configure and manage sudo and sudoers files - -This is the main page of the documentation for this Puppet module, which is hosted and managed by [Read the Docs](http://ulhpc-sudo.readthedocs.org/en/latest/). -It proposes to detail the following elements: - -* An [Overview](overview.md) of the module is proposed, describing the puppet classes and/or definitions it implements. - - you might also wish to check the `tests/` directory for sample test cases -* How to [test this module with Vagrant](vagrant.md) -* How to [contribute](contributing/index.md) to this puppet module development. In particular, we detail: - - the [directory tree structure](contributing/layout.md) - - the steps to follow to [setup this repository](contributing/setup.md) - - information as regard the [semantic versioning](contributing/versioning.md) of this Puppet module. - - Apart form the directory layout, we will cover various configuration aspects ([git-flow](https://github.com/nvie/gitflow), [RVM](https://rvm.io/), [Bundler](http://bundler.io/) etc.) -* Details on the [Read the Docs](http://ulhpc-puppet-sudo.readthedocs.org/en/latest/) management. diff --git a/docs/overview.md b/docs/overview.md deleted file mode 120000 index 32d46ee..0000000 --- a/docs/overview.md +++ /dev/null @@ -1 +0,0 @@ -../README.md \ No newline at end of file diff --git a/docs/rtfd.md b/docs/rtfd.md deleted file mode 100644 index dc9e961..0000000 --- a/docs/rtfd.md +++ /dev/null @@ -1,9 +0,0 @@ -The documentation for this puppet module is handled by [Read the Docs](https://readthedocs.org/), a web service dedicated to documentation management for the open source community. - -* [Reference documentation](https://docs.readthedocs.org/en/latest/) - -You might wish to generate locally the docs: - -* Install [`mkdocs`](http://www.mkdocs.org/#installation) -* Preview your documentation from the project root by running `mkdocs serve` and visite with your favorite browser the URL `http://localhost:8000` -* build the full documentation locally by running `mkdocs build` diff --git a/docs/vagrant.md b/docs/vagrant.md deleted file mode 100644 index 6db69d6..0000000 --- a/docs/vagrant.md +++ /dev/null @@ -1,79 +0,0 @@ --*- mode: markdown; mode: visual-line; -*- - -# Sudo Puppet Module Tests with Vagrant - -The best way to test this module in a non-intrusive way is to rely on [Vagrant](http://www.vagrantup.com/). -[Vagrant](http://vagrantup.com/) uses [Oracle's VirtualBox](http://www.virtualbox.org/) -to build configurable, lightweight, and portable virtual machines dynamically. - -* [Reference installation notes](http://docs.vagrantup.com/v2/installation/) -- assuming you have installed [Oracle's VirtualBox](http://www.virtualbox.org/) -* [installation notes on Mac OS](http://sourabhbajaj.com/mac-setup/Vagrant/README.html) using [Homebrew](http://brew.sh/) and [Cask](http://sourabhbajaj.com/mac-setup/Homebrew/Cask.html) - -The `Vagrantfile` at the root of the repository pilot the provisioning a vagrant boxes. -It can run any OS you set in `tests/vagrant/config.yaml` as follows: - -```yaml -:vms: - 'default': - :os: :debian8 -``` - -You can list the available vagrant box as follows: - -```bash -$> vagrant status -Current machine states: - -centos-7 running (virtualbox) - -The VM is running. To stop this VM, you can run `vagrant halt` to -shut it down forcefully, or you can run `vagrant suspend` to simply -suspend the virtual machine. In either case, to restart it again, -simply run `vagrant up`. -``` - -You can boot the VM and provision it (using the scripts under `tests/vagrant/`) by running: - -```bash -$> vagrant up -``` - -Then you can ssh into the machine afterwards: - -```bash -$> vagrant ssh -``` - -When you run `vagrant up ` to boot the VM, the provisioning scripts are responsible for: - -| Script | Description | -|---------------------------|-------------------------------------------------| -| `bootstrap.sh` | Install puppet 4 and defaults packages and gems | -| `puppet_modules_setup.rb` | pre-install the necessary puppet modules | - -More precisely, the `tests/vagrant/puppet_modules_setup.rb` script. -This script is responsible for two main tasks: - -1. pre-install the puppet modules listed as dependencies in `metadata.json` -2. make the appropriate symbolic link in the puppet module directory (to `/vagrant`) to ensure you can directly make changes and correct your own module transparently within the box. - -So you can test the manifests of the `tests/` directory within the VM: - - $> vagrant ssh [] - [...] - (vagrant)$> sudo puppet apply -t /vagrant/tests/init.pp - -From now on, you can test (with --noop) the other manifests. - -Run `vagrant halt` (or `vagrant destroy`) to stop (or kill) the VM once you've finished to play with it. - -_Note_: The `Vagrantfile` at the root of this repository might evolve over the time with new boxes. To automatically get the last version available: - -1. Upgrade the [`falkorlib`](https://rubygems.org/gems/falkorlib) gem - - $> bundle update falkorlib - $> git commit -s -m "Upgrade falkorlib to the latest version" Gemfile.lock - -2. update the `Vagrantfile` to the last version by issuing: - - $> rake templates:upgrade:vagrant diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index ce7b6aa..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,13 +0,0 @@ -site_name: ULHPC/sudo Puppet Module -pages: -- Home: 'index.md' -- Overview: 'overview.md' -- Tests with Vagrant: 'vagrant.md' -- Contributing: - - Overview: 'contributing/index.md' - - Directory Layout: 'contributing/layout.md' - - Repository Setup and Developments: 'contributing/setup.md' - - Module Versioning: 'contributing/versioning.md' -- Documentation/RTFD: 'rtfd.md' -- Contacts: 'contacts.md' -theme: readthedocs diff --git a/tests/alias/command.pp b/tests/alias/command.pp deleted file mode 100644 index 1121f66..0000000 --- a/tests/alias/command.pp +++ /dev/null @@ -1,16 +0,0 @@ -# File:: command.pp -# Author:: Sebastien Varrette () -# Copyright:: Copyright (c) 2014 Sebastien Varrette (www[http://varrette.gforge.uni.lu]) -# License:: GPLv3 -# -# ------------------------------------------------------------------------------ -# Execute this manifest in your vagrant box as follows: -# -# sudo puppet apply -t /vagrant/tests/alias/command.pp --noop -# - -include 'sudo' - -sudo::alias::command{ 'NETWORK': - cmdlist => [ '/sbin/route', '/sbin/ifconfig', '/bin/ping', '/sbin/dhclient', '/sbin/iptables' ], -} diff --git a/tests/alias/host.pp b/tests/alias/host.pp deleted file mode 100644 index f566f45..0000000 --- a/tests/alias/host.pp +++ /dev/null @@ -1,27 +0,0 @@ -# File:: host.pp -# Author:: Sebastien Varrette () -# Copyright:: Copyright (c) 2014 Sebastien Varrette (www[http://varrette.gforge.uni.lu]) -# License:: GPLv3 -# -# ------------------------------------------------------------------------------ -# Execute this manifest in your vagrant box as follows -# -# sudo puppet apply -t /vagrant/tests/alias/host.pp --noop -# - -class { 'sudo': - configfile => '/tmp/sudoers', -} - -sudo::alias::host{ 'SERVERS': - hostlist => [ '192.168.0.1', '192.168.0.2' ], - comment => 'This is all the servers', -} -sudo::alias::host{ 'NETWORK': - hostlist => [ '192.168.0.0/255.255.255.0' ], -} -sudo::alias::host{ 'WORKSTATIONS': - hostlist => [ 'NETWORK', '!SERVER' ], - comment => 'This is every machine in the network that is not a server', -} - diff --git a/tests/alias/user.pp b/tests/alias/user.pp deleted file mode 100644 index 4488d9c..0000000 --- a/tests/alias/user.pp +++ /dev/null @@ -1,18 +0,0 @@ -# File:: user.pp -# Author:: Sebastien Varrette () -# Copyright:: Copyright (c) 2014 Sebastien Varrette (www[http://varrette.gforge.uni.lu]) -# License:: GPLv3 -# -# ------------------------------------------------------------------------------ -# Execute this manifest in your vagrant box as follows: -# -# sudo puppet apply -t /vagrant/tests/alias/user.pp --noop -# - -class { 'sudo': - configfile => '/tmp/sudoers', -} - -sudo::alias::user{ 'ADMINS': - userlist => [ 'jsmith', 'mikem' ], -} diff --git a/tests/defaults/spec.pp b/tests/defaults/spec.pp deleted file mode 100644 index 624568b..0000000 --- a/tests/defaults/spec.pp +++ /dev/null @@ -1,21 +0,0 @@ -# File:: spec.pp -# Author:: Sebastien Varrette () -# Copyright:: Copyright (c) 2014 Sebastien Varrette (www[http://varrette.gforge.uni.lu]) -# License:: GPLv3 -# -# ------------------------------------------------------------------------------ -# Execute this manifest in your vagrant box as follows: -# -# sudo puppet apply -t /vagrant/tests/defaults/spec.pp --noop -# - -include 'sudo' - -sudo::defaults::spec { 'env_keep': - content => " -Defaults env_reset -Defaults env_keep = \"COLORS DISPLAY HOSTNAME LS_COLORS\" -Defaults env_keep += \"MAIL PS1 PS2 USERNAME LANG LC_ADDRESS LC_CTYPE\" -Defaults env_keep += \"LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES\" -Defaults env_keep += \"LC_TIME LC_ALL LANGUAGE\"\n", -} diff --git a/tests/directive.pp b/tests/directive.pp deleted file mode 100644 index be6c255..0000000 --- a/tests/directive.pp +++ /dev/null @@ -1,21 +0,0 @@ -# File:: directive.pp -# Author:: Sebastien Varrette () -# Copyright:: Copyright (c) 2014 Sebastien Varrette (www[http://varrette.gforge.uni.lu]) -# License:: GPLv3 -# -# ------------------------------------------------------------------------------ -# Execute this manifest in your vagrant box as follows: -# -# sudo puppet apply -t /vagrant/tests/directive.pp --noop - -class { 'sudo': - configfile => '/tmp/sudoers', -} - -sudo::directive {'vagrant': - content => "vagrant ALL=NOPASSWD:ALL\n", -} - -sudo::directive {'admin_users': - content => "%admin ALL=(ALL) ALL\n", -} diff --git a/tests/init.pp b/tests/init.pp deleted file mode 100644 index ac169ec..0000000 --- a/tests/init.pp +++ /dev/null @@ -1,27 +0,0 @@ -# The baseline for module testing used by Puppet Labs is that each manifest -# should have a corresponding test manifest that declares that class or defined -# type. -# -# Tests are then run by using puppet apply --noop (to check for compilation -# errors and view a log of events) or by fully applying the test in a virtual -# environment (to compare the resulting system state to the desired state). -# -# Learn more about module testing here -# http://docs.puppetlabs.com/guides/tests_smoke.html -# -# -# You can execute this manifest as follows in your vagrant box -# -# sudo puppet apply -t /vagrant/tests/init.pp -# - -node default { - class { 'sudo': - configfile => '/tmp/sudoers', - } - - sudo::directive {'vagrant': - content => "vagrant ALL=NOPASSWD:ALL\n", - } - -} diff --git a/tests/params.pp b/tests/params.pp deleted file mode 100644 index 33e26db..0000000 --- a/tests/params.pp +++ /dev/null @@ -1,38 +0,0 @@ -# File:: params.pp -# Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu) -# Copyright:: Copyright (c) 2016 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team -# License:: Gpl-3.0 -# -# ------------------------------------------------------------------------------ -# You need the 'future' parser to be able to execute this manifest (that's -# required for the each loop below). -# -# Thus execute this manifest in your vagrant box as follows: -# -# sudo puppet apply -t --parser future /vagrant/tests/params.pp -# -# - -include 'sudo::params' - -$names = ['ensure', 'packagename', 'configfile', 'backupconfigfile', 'configfile_mode', 'configfile_owner', 'configfile_group', - 'configdir', 'configdir_mode', 'configdir_owner', 'configdir_group', 'check_syntax_name', 'cmdalias_pkgmanager'] - -notice("sudo::params::ensure = ${sudo::params::ensure}") -notice("sudo::params::packagename = ${sudo::params::packagename}") -notice("sudo::params::configfile = ${sudo::params::configfile}") -notice("sudo::params::backupconfigfile = ${sudo::params::backupconfigfile}") -notice("sudo::params::configfile_mode = ${sudo::params::configfile_mode}") -notice("sudo::params::configfile_owner = ${sudo::params::configfile_owner}") -notice("sudo::params::configfile_group = ${sudo::params::configfile_group}") -notice("sudo::params::configdir = ${sudo::params::configdir}") -notice("sudo::params::configdir_mode = ${sudo::params::configdir_mode}") -notice("sudo::params::configdir_owner = ${sudo::params::configdir_owner}") -notice("sudo::params::configdir_group = ${sudo::params::configdir_group}") -notice("sudo::params::check_syntax_name = ${sudo::params::check_syntax_name}") -notice("sudo::params::cmdalias_pkgmanager = ${sudo::params::cmdalias_pkgmanager}") - -#each($names) |$v| { -# $var = "sudo::params::${v}" -# notice("${var} = ", inline_template('<%= scope.lookupvar(@var) %>')) -#} diff --git a/tests/vagrant/bootstrap.sh b/tests/vagrant/bootstrap.sh deleted file mode 100644 index 3e391b0..0000000 --- a/tests/vagrant/bootstrap.sh +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/env bash -# Time-stamp: -########################################################################################### -# __ __ _ ____ _ _ -# \ \ / /_ _ __ _ _ __ __ _ _ __ | |_ | __ ) ___ ___ | |_ ___| |_ _ __ __ _ _ __ -# \ \ / / _` |/ _` | '__/ _` | '_ \| __| | _ \ / _ \ / _ \| __/ __| __| '__/ _` | '_ \ -# \ V / (_| | (_| | | | (_| | | | | |_ | |_) | (_) | (_) | |_\__ \ |_| | | (_| | |_) | -# \_/ \__,_|\__, |_| \__,_|_| |_|\__| |____/ \___/ \___/ \__|___/\__|_| \__,_| .__/ -# |___/ |_| -# Copyright (c) 2017 UL HPC Team -########################################################################################### -# ULHPC (prefered) way to see a Vagrant box configured. -# - -SETCOLOR_NORMAL=$(tput sgr0) -SETCOLOR_TITLE=$(tput setaf 6) -SETCOLOR_SUBTITLE=$(tput setaf 14) -SETCOLOR_RED=$(tput setaf 1) -SETCOLOR_BOLD=$(tput setaf 15) - -### Local variables -STARTDIR="$(pwd)" -SCRIPTFILENAME=$(basename $0) -SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -MOTD="/etc/motd" -DOTFILES_DIR='/etc/dotfiles.d' -DOTFILES_URL='https://github.com/ULHPC/dotfiles.git' -SUPPORT_MAIL='hpc-sysadmins@uni.lu' -EXTRA_PACKAGES= - -# List of default packages to install -COMMON_DEFAULT_PACKAGES="ruby wget figlet git screen bash-completion rsync vim" - -GEMS="librarian-puppet falkorlib" - -###### -# Print information in the following form: '[$2] $1' ($2=INFO if not submitted) -# usage: info text [title] -## -info () { - echo - echo "${SETCOLOR_BOLD}###${SETCOLOR_NORMAL} ${SETCOLOR_TITLE}${1}${SETCOLOR_NORMAL} ${SETCOLOR_BOLD}###${SETCOLOR_NORMAL}" -} -error() { - echo - echo "${SETCOLOR_RED}*** ERROR *** $*${SETCOLOR_NORMAL}" - exit 1 -} - -print_usage() { - cat </dev/null - - info "Installing default packages" - yum install -y epel-release - yum install -y ${COMMON_DEFAULT_PACKAGES} ruby-devel bind-utils ${EXTRA_PACKAGES} >/dev/null - - info "Uninstalling (eventually) existing Puppet installation" - yum erase -y puppet puppetlabs-release >/dev/null - - info "Adding repo for Puppet 4" - rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-$1.noarch.rpm - - sleep 1 - info "Installing Puppet and its dependencies" - yum install -y puppet-agent >/dev/null -} - -setup_apt() { - case $1 in - 3*) codename=cumulus ;; - 6) codename=squeeze ;; - 7) codename=wheezy ;; - 8) codename=jessie ;; - 9) codename=stretch ;; - 12.04) codename=precise ;; - 14.04) codename=trusty ;; - 16.04) codename=xenial ;; - *) echo "Release not supported" ;; - esac - - info "Adding repo for Puppet 4" - wget -q "http://apt.puppetlabs.com/puppetlabs-release-pc1-${codename}.deb" >/dev/null - dpkg -i "puppetlabs-release-pc1-${codename}.deb" >/dev/null - - info "Running apt-get update" - apt-get update >/dev/null 2>&1 - - info "Installing default packages" - apt-get install -y ${COMMON_DEFAULT_PACKAGES} git-core rubygems ${EXTRA_PACKAGES} >/dev/null - - info "Installing Puppet and its dependencies" - apt-get install puppet-agent -y >/dev/null - apt-get install apt-transport-https -y >/dev/null -} - -setup_linux() { - ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/') - if [ -f /etc/redhat-release ]; then - OS=$(cat /etc/redhat-release | cut -d ' ' -f 1) - majver=$(cat /etc/redhat-release | sed 's/[A-Za-z]*//g' | sed 's/ //g' | cut -d '.' -f 1) - elif [ -f /etc/SuSE-release ]; then - OS=sles - majver=$(cat /etc/SuSE-release | grep VERSION | cut -d '=' -f 2 | tr -d '[:space:]') - elif [ -f /etc/os-release ]; then - . /etc/os-release - OS=$ID - majver=$VERSION_ID - elif [ -f /etc/debian_version ]; then - OS=Debian - majver=$(cat /etc/debian_version | cut -d '.' -f 1) - elif [ -f /etc/lsb-release ]; then - . /etc/lsb-release - OS=$DISTRIB_ID - majver=$DISTRIB_RELEASE - elif [ -f /etc/os-release ]; then - . /etc/os-release - OS=$ID - majver=$VERSION_ID - else - OS=$(uname -s) - majver=$(uname -r) - fi - distro=$(echo $OS | tr '[:upper:]' '[:lower:]') - info "Detected Linux distro: ${distro} version ${majver} on arch ${ARCH}" - case "$distro" in - debian|ubuntu) setup_apt $majver ;; - redhat|fedora|centos|scientific|amazon) setup_redhat $majver ;; - *) echo "Not supported distro: $distro"; exit 1;; - esac - -} - -setup_dotfiles () { - if [ ! -d "${DOTFILES_DIR}" ]; then - info "cloning ULHPC/dotfiles repository in '/etc/dotfiles.d" - git clone ${DOTFILES_URL} ${DOTFILES_DIR} - fi - # Correct __git_ps1 - local src_git_prompt="/usr/share/git-core/contrib/completion/git-prompt.sh" - local dst_git_prompt="/etc/profile.d/git-prompt.sh" - if [ -f "${src_git_prompt}" ]; then - info "installing git-prompt to define __git_ps1" - [ ! -e "${dst_git_prompt}" ] && ln -s ${src_git_prompt} ${dst_git_prompt} - fi - local dotfile_install_cmd="${DOTFILES_DIR}/install.sh --offline --force -d ${DOTFILES_DIR} --bash --screen" - if [ -d "${DOTFILES_DIR}" ]; then - info "installing dotfiles for 'root' user" - ${dotfile_install_cmd} - info "installing dotfiles for 'vagrant' user" - sudo -u vagrant ${dotfile_install_cmd} - fi -} - -setup_motd() { - local motd=/etc/motd - local has_figlet=$(which figlet 2>/dev/null) - info "setup ${motd}" - cat < ${motd} -================================================================================ - Welcome to the Vagrant box $(hostname) -================================================================================ -EOF - if [ -n "${has_figlet}" ]; then - cat <> ${motd} -$(${has_figlet} -w 80 -c "$(hostname -s)") -EOF - fi - cat <> ${motd} -================================================================================ - Hostname.... $(hostname -f) - OS.......... $(facter os.name) $(facter os.release.full) - Support..... ${SUPPORT_MAIL} - Docs........ Vagrant: http://docs.vagrantup.com/v2/ -================================================================================ -EOF -} - -setup_gems() { - sudo gem install --no-ri --no-rdoc ${GEMS} -} - -###################################################################################### -[ $UID -gt 0 ] && error "You must be root to execute this script (current uid: $UID)" - - -# Parse the command-line options -while [ $# -ge 1 ]; do - case $1 in - -h | --help) print_usage; exit 0;; - -V | --version) print_version; exit 0;; - -n | --name) shift; NAME=$1;; - -t | --title) shift; TITLE=$1;; - -st| --subtitle) shift; SUBTITLE=$1;; - -d | --desc) shift; DESC=$1;; - -s | --support) shift; SUPPORT_MAIL=$1;; - -x | --extras) shift; EXTRA_PACKAGES=$1;; - esac - shift -done - -# Let's go -case "$OSTYPE" in - linux*) setup_linux ;; - *) echo "unknown: $OSTYPE"; exit 1;; -esac - -[ -f /usr/bin/puppet ] || ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet -[ -f /usr/bin/facter ] || ln -s /opt/puppetlabs/puppet/bin/facter /usr/bin/facter - -setup_dotfiles -setup_motd -setup_gems diff --git a/tests/vagrant/config.yaml b/tests/vagrant/config.yaml deleted file mode 100644 index 665b392..0000000 --- a/tests/vagrant/config.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# -*- mode: yaml; -*- -# Time-stamp: -################################################################################ -# Complementary configuration for Vagrant -# You can overwrite here the default settings defined in ../../Vagrantfile and -# define additional VMs (agents) to deploy upon vagrant up (in addition to the -# puppet master 'master') - -#___________________________________________ -# Complete / re-define the default boxes below -# Format: -# :: / # see https://vagrantcloud.com -# :boxes: -# :windows2012: 'opentable/win-2012r2-standard-amd64-nocm' -# :freebsd12: 'freebsd/FreeBSD-12.0-RELEASE' -# :centos7: 'centos/7', -# :debian8: 'debian/contrib-jessie64', -# :ubuntu14: 'ubuntu/trusty64' - -#_________________ -# Default settings -# :defaults: -# :os: :centos7 # Default OS from the above box definition -# :ram: 512 # Default RAM -# :vcpus: 1 # Default number of virtual CPUs -# :vbguest_auto_update: 1 # check/update box guest additions - -#____________________ -# Network settings -# :network: -# :domain: 'vagrant.dev' # network domain to use -# :range: '10.10.1.0/24' # IP range to use -# :ip_offset: 10 -# # client / VMs defined below will start on xx.xx.xx. - -#___________________________________________________________ -# VMs / Vagrant boxes to define apart from the puppet master -# Format: -# : -# :hostname: -# :desc: -# :os: -# :ram: -# :vcpus: -# :role: -# :roles: -# - -# - -# :vms: -# 'default': -# :os: :debian8 diff --git a/tests/vagrant/puppet_modules_setup.rb b/tests/vagrant/puppet_modules_setup.rb deleted file mode 100644 index ff4be0e..0000000 --- a/tests/vagrant/puppet_modules_setup.rb +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env ruby -########################################################################## -# puppet_module_setup.rb -# @author Sebastien Varrette -# Time-stamp: -# -# @description Prepare the Vagrant box to test this Puppet module -# -# Copyright (c) 2014-2017 Sebastien Varrette -# . http://varrette.gforge.uni.lu -############################################################################## - -require 'json' -require 'yaml' -require 'falkorlib' - -include FalkorLib::Common - -# Load metadata -basedir = File.directory?('/vagrant') ? '/vagrant' : Dir.pwd -jsonfile = File.join( basedir, 'metadata.json') -puppetdir = '/etc/puppetlabs' - -error "Unable to find the metadata.json" unless File.exists?(jsonfile) - -metadata = JSON.parse( IO.read( jsonfile ) ) -name = metadata["name"].gsub(/^[^\/-]+[\/-]/,'') -modulepath=`puppet config print modulepath`.chomp -moduledir=modulepath.split(':').first - - -run %{ cd #{moduledir}/.. && librarian-puppet clean && rm Puppetfile* } -run %{ ln -s /vagrant/metadata.json #{moduledir}/../ } -run %{ cd #{moduledir}/.. && librarian-puppet install --verbose } - - -# metadata["dependencies"].each do |dep| -# lib = dep["name"] -# shortname = lib.gsub(/^.*[\/-]/,'') -# action = File.directory?("#{moduledir}/#{shortname}") ? 'upgrade --force' : 'install' -# run %{ puppet module #{action} #{lib} } -# end - -puts "Module path: #{modulepath}" -puts "Moduledir: #{moduledir}" - -info "set symlink to the '#{basedir}' module for local developments" -run %{ ln -s #{basedir} #{moduledir}/#{name} } unless File.exists?("#{moduledir}/#{name}") - -# Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5 -hiera = '/etc/puppetlabs/puppet/hiera.yaml' - - - - -# Prepare hiera -# unless File.exists?('/etc/puppet/hiera.yaml') -# run %{ ln -s /etc/hiera.yaml /etc/puppet/hiera.yaml } if File.exists?("/etc/hiera.yaml") -# end -# # # hieracfg = YAML::load_file('/etc/hiera.yaml') -# # # [ '/vagrant/tests/hiera' ].each do |d| -# # # hieracfg[:datadir] = [] if hieracfg[:datadir].nil? -# # # hieracfg[:datadir] << d #if File.directory?('#{d}') -# # # end -# # # hieracfg[:hierarchy] = [] if hieracfg[:hierarchy].nil? -# # # hieracfg[:hierarchy] << 'common' unless hieracfg[:hierarchy].include?('common') -# hieracfg = { -# :backends => [ 'yaml' ], -# :hierarchy => [ 'defaults', 'common' ], -# :yaml => { -# :datadir => '/vagrant/tests/hiera', -# } -# } -# FalkorLib::Common.store_config('/etc/hiera.yaml', hieracfg, {:no_interaction => true}) From e3063b5c3d694b560a8baf6e2c936625b1fbd3aa Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 16:03:47 +0200 Subject: [PATCH 07/10] chore: modernize metadata.json --- metadata.json | 51 ++++++++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/metadata.json b/metadata.json index 4f32c0e..c90e9e5 100644 --- a/metadata.json +++ b/metadata.json @@ -2,74 +2,63 @@ "name": "ULHPC-sudo", "version": "0.4.9", "author": "UL HPC Team", - "mail": "hpc-sysadmins@uni.lu", "summary": "Configure and manage sudo and sudoers files", - "description": "Manage sudo configuration via Puppet", "license": "GPL-3.0", "source": "https://github.com/ULHPC/puppet-sudo", "project_page": "https://github.com/ULHPC/puppet-sudo", "issues_url": "https://github.com/ULHPC/puppet-sudo/issues", - "forge_url": "https://forge.puppetlabs.com/ULHPC/sudo", - "docs_project": "ulhpc-puppet-sudo", "dependencies": [ { "name": "puppetlabs-stdlib", - "version_requirement": ">=4.0.0 < 6.0.0" + "version_requirement": ">=4.0.0 <10.0.0" }, { "name": "puppetlabs/concat", - "version_requirement": ">=1.2.0 < 5.0.0" + "version_requirement": ">=1.2.0 <5.0.0" } ], "operatingsystem_support": [ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "6", - "7", - "8" + "11", + "12", + "13" ] }, { "operatingsystem": "RedHat", "operatingsystemrelease": [ - "6.0", - "7.0", - "8.0" + "7", + "8", + "9", + "10" ] }, { "operatingsystem": "Rocky", "operatingsystemrelease": [ - "8.0" + "8", + "9", + "10" ] }, { "operatingsystem": "CentOS", "operatingsystemrelease": [ - "6.0", - "7.0" + "7" ] } ], + "requirements": [ + { + "name": "puppet", + "version_requirement": ">= 8.0.0 < 9.0.0" + } + ], "tags": [ "sudo", "sudoers", "security" - ], - "classes": [ - "sudo", - "sudo::common", - "sudo::common::debian", - "sudo::common::redhat", - "sudo::params" - ], - "definitions": [ - "sudo::alias::command", - "sudo::alias::host", - "sudo::alias::user", - "sudo::conf", - "sudo::defaults::spec", - "sudo::directive" ] -} \ No newline at end of file +} From 0a409a540673a43fb29e67f538dbc0aa53228c70 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 16:08:15 +0200 Subject: [PATCH 08/10] refactor: lint --- lib/facter/sudo.rb | 12 +- manifests/alias/command.pp | 50 ++++---- manifests/alias/host.pp | 47 +++---- manifests/alias/user.pp | 53 ++++---- manifests/common.pp | 249 ++++++++++++++++++------------------- manifests/common/debian.pp | 2 +- manifests/common/redhat.pp | 2 +- manifests/conf.pp | 52 ++++---- manifests/defaults/spec.pp | 78 ++++++------ manifests/directive.pp | 147 +++++++++++----------- manifests/init.pp | 34 +++-- manifests/params.pp | 108 ++++++++-------- 12 files changed, 386 insertions(+), 448 deletions(-) diff --git a/lib/facter/sudo.rb b/lib/facter/sudo.rb index 13408d0..5eea861 100644 --- a/lib/facter/sudo.rb +++ b/lib/facter/sudo.rb @@ -1,13 +1,11 @@ -Facter.add("sudoversion") do - confine :kernel => 'Linux' +Facter.add('sudoversion') do + confine kernel: 'Linux' setcode do - ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" + ENV['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin' output = `sudo -V 2>&1` if $?.exitstatus.zero? - m = /Sudo version ([\d\.]+)/.match output - if m - m[1] - end + m = %r{Sudo version ([\d.]+)}.match output + m[1] if m end end end diff --git a/manifests/alias/command.pp b/manifests/alias/command.pp index 5c7a6ce..29757bb 100644 --- a/manifests/alias/command.pp +++ b/manifests/alias/command.pp @@ -41,37 +41,29 @@ # # [Remember: No empty lines between comments and class definition] # -define sudo::alias::command( - $cmdlist = [], - $ensure = 'present' -) -{ +define sudo::alias::command ( + $cmdlist = [], + $ensure = 'present' +) { + include sudo::params - include sudo::params + # $name is provided by define invocation + # guid of this entry + $groupname = $name - # $name is provided by define invocation - # guid of this entry - $groupname = $name - - if ! ($ensure in [ 'present', 'absent' ]) { - fail("sudo::alias::command 'ensure' parameter must be set to either 'absent', or 'present'") - } - if ($sudo::ensure != $ensure) { - if ($sudo::ensure != 'present') { - fail("Cannot configure the sudo alias '${groupname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") - } - } - - concat::fragment { "sudoers_command_aliases_${groupname}": - target => $sudo::configfile, - content => inline_template("## <%= @groupname.capitalize %>\nCmnd_Alias <%= @groupname.upcase %> = <%= @cmdlist.join(', ') %>\n"), - order => 45, - notify => Exec[$sudo::params::check_syntax_name], + if ! ($ensure in ['present', 'absent']) { + fail("sudo::alias::command 'ensure' parameter must be set to either 'absent', or 'present'") + } + if ($sudo::ensure != $ensure) { + if ($sudo::ensure != 'present') { + fail("Cannot configure the sudo alias '${groupname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") } + } + concat::fragment { "sudoers_command_aliases_${groupname}": + target => $sudo::configfile, + content => inline_template("## <%= @groupname.capitalize %>\nCmnd_Alias <%= @groupname.upcase %> = <%= @cmdlist.join(', ') %>\n"), + order => 45, + notify => Exec[$sudo::params::check_syntax_name], + } } - - - - - diff --git a/manifests/alias/host.pp b/manifests/alias/host.pp index 93b2b9a..36aa845 100644 --- a/manifests/alias/host.pp +++ b/manifests/alias/host.pp @@ -53,38 +53,29 @@ # # [Remember: No empty lines between comments and class definition] # -define sudo::alias::host( +define sudo::alias::host ( $hostlist = [], $comment = '', $ensure = 'present' -) -{ - include sudo::params +) { + include sudo::params - # $name is provided by define invocation - # guid of this entry - $hostalias = $name + # $name is provided by define invocation + # guid of this entry + $hostalias = $name - if ! ($ensure in [ 'present', 'absent' ]) { - fail("sudo::alias::host 'ensure' parameter must be set to either 'absent', or 'present'") + if ! ($ensure in ['present', 'absent']) { + fail("sudo::alias::host 'ensure' parameter must be set to either 'absent', or 'present'") + } + if ($sudo::ensure != $ensure) { + if ($sudo::ensure != 'present') { + fail("Cannot configure the sudo host alias '${hostalias}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") } - if ($sudo::ensure != $ensure) { - if ($sudo::ensure != 'present') { - fail("Cannot configure the sudo host alias '${hostalias}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") - } - } - - concat::fragment { "sudoers_host_aliases_${hostalias}": - target => $sudo::configfile, - content => inline_template("<% unless @comment.empty? %># <%= @comment %>\n<% end %>Host_Alias <%= @hostalias.upcase %> = <%= @hostlist.join(', ') %>\n"), - order => 55, - notify => Exec[$sudo::params::check_syntax_name], - } - - -} - - - - + } + concat::fragment { "sudoers_host_aliases_${hostalias}": + target => $sudo::configfile, + content => inline_template("<% unless @comment.empty? %># <%= @comment %>\n<% end %>Host_Alias <%= @hostalias.upcase %> = <%= @hostlist.join(', ') %>\n"), + order => 55, + notify => Exec[$sudo::params::check_syntax_name], +} } diff --git a/manifests/alias/user.pp b/manifests/alias/user.pp index baadd25..d4f09f7 100644 --- a/manifests/alias/user.pp +++ b/manifests/alias/user.pp @@ -44,38 +44,29 @@ # # [Remember: No empty lines between comments and class definition] # -define sudo::alias::user( - $userlist = [], - $ensure = 'present', - $order = 25 -) -{ - include sudo::params +define sudo::alias::user ( + $userlist = [], + $ensure = 'present', + $order = 25 +) { + include sudo::params - # $name is provided by define invocation - # guid of this entry - $groupname = $name + # $name is provided by define invocation + # guid of this entry + $groupname = $name - if ! ($ensure in [ 'present', 'absent' ]) { - fail("sudo::alias::user 'ensure' parameter must be set to either 'absent', or 'present'") + if ! ($ensure in ['present', 'absent']) { + fail("sudo::alias::user 'ensure' parameter must be set to either 'absent', or 'present'") + } + if ($sudo::ensure != $ensure) { + if ($sudo::ensure != 'present') { + fail("Cannot configure the sudo user alias '${groupname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") } - if ($sudo::ensure != $ensure) { - if ($sudo::ensure != 'present') { - fail("Cannot configure the sudo user alias '${groupname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") - } - } - - concat::fragment { "sudoers_user_aliases_${groupname}": - target => $sudo::configfile, - content => inline_template("User_Alias <%= @groupname.upcase %> = <%= @userlist.join(', ') %>\n"), - order => $order, - notify => Exec[$sudo::params::check_syntax_name], - } - - -} - - - - + } + concat::fragment { "sudoers_user_aliases_${groupname}": + target => $sudo::configfile, + content => inline_template("User_Alias <%= @groupname.upcase %> = <%= @userlist.join(', ') %>\n"), + order => $order, + notify => Exec[$sudo::params::check_syntax_name], +} } diff --git a/manifests/common.pp b/manifests/common.pp index 6586c11..2ffdc0d 100644 --- a/manifests/common.pp +++ b/manifests/common.pp @@ -10,150 +10,141 @@ # # Note: respect the Naming standard provided here[http://projects.puppetlabs.com/projects/puppet/wiki/Module_Standards] class sudo::common { - - # Load the variables used in this module. Check the ssh-server-params.pp file - require sudo::params - - # $package_ensure = $sudo::ensure ? { - # 'absent' => 'purged', - # default => $sudo::ensure + # Load the variables used in this module. Check the ssh-server-params.pp file + require sudo::params + + # $package_ensure = $sudo::ensure ? { + # 'absent' => 'purged', + # default => $sudo::ensure + # } + #notice("sudo::ensure = $sudo::ensure") + package { 'sudo': + ensure => $sudo::ensure, + name => $sudo::params::packagename, + } + + if ($sudo::ensure == 'present') { + # eventually backup old version + # exec { "backup ${sudo::params::configfile}": + # command => "cp ${sudo::params::configfile} ${sudo::params::backupconfigfile}", + # path => "/usr/bin:/usr/sbin:/bin", + # creates => "${sudo::params::backupconfigfile}", + # onlyif => "test -f ${sudo::params::configfile}", + # #unless => "test -f ${sudo::params::backupconfigfile}", + # #require => Package['sudo'], + # #before => Concat["${sudo::params::configfile}"], # } - #notice("sudo::ensure = $sudo::ensure") - package { 'sudo': - ensure => $sudo::ensure, - name => $sudo::params::packagename, - } - if ($sudo::ensure == 'present') { - - # eventually backup old version - # exec { "backup ${sudo::params::configfile}": - # command => "cp ${sudo::params::configfile} ${sudo::params::backupconfigfile}", - # path => "/usr/bin:/usr/sbin:/bin", - # creates => "${sudo::params::backupconfigfile}", - # onlyif => "test -f ${sudo::params::configfile}", - # #unless => "test -f ${sudo::params::backupconfigfile}", - # #require => Package['sudo'], - # #before => Concat["${sudo::params::configfile}"], - # } - - # Package['sudo'] -> Exec["backup ${sudo::params::configfile}"] - # #-> Concat["${sudo::params::configfile}"] - - #include concat::setup -- Now deprecated - - concat { $sudo::configfile: - warn => true, - owner => $sudo::params::configfile_owner, - group => $sudo::params::configfile_group, - mode => $sudo::params::configfile_mode, - require => Package['sudo'], - notify => Exec[$sudo::params::check_syntax_name], - } + # Package['sudo'] -> Exec["backup ${sudo::params::configfile}"] + # #-> Concat["${sudo::params::configfile}"] - # Header of the file - concat::fragment { 'sudoers_header': - target => $sudo::configfile, - source => 'puppet:///modules/sudo/01-sudoers_header', - order => '01', - } + #include concat::setup -- Now deprecated - # Header of the User aliases - concat::fragment { 'sudoers_user_aliases_header': - target => $sudo::configfile, - source => 'puppet:///modules/sudo/20-sudoers_user_aliases_header', - order => 20, - } + concat { $sudo::configfile: + warn => true, + owner => $sudo::params::configfile_owner, + group => $sudo::params::configfile_group, + mode => $sudo::params::configfile_mode, + require => Package['sudo'], + notify => Exec[$sudo::params::check_syntax_name], + } + # Header of the file + concat::fragment { 'sudoers_header': + target => $sudo::configfile, + source => 'puppet:///modules/sudo/01-sudoers_header', + order => '01', + } - # Header of the Command aliases - concat::fragment { 'sudoers_command_aliases_header': - target => $sudo::configfile, - content => template('sudo/40-sudoers_command_aliases_header.erb'), - order => 40, - } + # Header of the User aliases + concat::fragment { 'sudoers_user_aliases_header': + target => $sudo::configfile, + source => 'puppet:///modules/sudo/20-sudoers_user_aliases_header', + order => 20, + } - # Header of the Host aliases - concat::fragment { 'sudoers_host_aliases_header': - target => $sudo::configfile, - source => 'puppet:///modules/sudo/50-sudoers_host_aliases_header', - order => 50, - } + # Header of the Command aliases + concat::fragment { 'sudoers_command_aliases_header': + target => $sudo::configfile, + content => template('sudo/40-sudoers_command_aliases_header.erb'), + order => 40, + } - # Header of the Defaults specs - concat::fragment { 'sudoers_default_specs_header': - target => $sudo::configfile, - content => template('sudo/60-sudoers_default_specs.erb'), - order => 60, - } + # Header of the Host aliases + concat::fragment { 'sudoers_host_aliases_header': + target => $sudo::configfile, + source => 'puppet:///modules/sudo/50-sudoers_host_aliases_header', + order => 50, + } - # Header of the main part - concat::fragment { 'sudoers_mainheader': - target => $sudo::configfile, - source => 'puppet:///modules/sudo/80-sudoers_main_header', - order => 80, - } + # Header of the Defaults specs + concat::fragment { 'sudoers_default_specs_header': + target => $sudo::configfile, + content => template('sudo/60-sudoers_default_specs.erb'), + order => 60, + } - if ($facts['sudoversion'] != undef) { - if versioncmp($facts['sudoversion'],'1.7.1') > 0 { - # - # Use the #includedir directive to manage sudoers.d, version >= 1.7.2 - # - concat::fragment { 'sudoers_footer_includedir': - target => $sudo::configfile, - content => "## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment) + # Header of the main part + concat::fragment { 'sudoers_mainheader': + target => $sudo::configfile, + source => 'puppet:///modules/sudo/80-sudoers_main_header', + order => 80, + } + + if ($facts['sudoversion'] != undef) { + if versioncmp($facts['sudoversion'],'1.7.1') > 0 { + # + # Use the #includedir directive to manage sudoers.d, version >= 1.7.2 + # + concat::fragment { 'sudoers_footer_includedir': + target => $sudo::configfile, + content => "## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment) #includedir ${sudo::params::configdir}\n", - order => 99, - } - - file { $sudo::configdir: - ensure => 'directory', - owner => $sudo::params::configdir_owner, - group => $sudo::params::configdir_group, - mode => $sudo::params::configdir_mode, - purge => true, - recurse => true, - } + order => 99, } - } - # check the syntax of the sudoers files - exec {$sudo::params::check_syntax_name: - path => '/usr/bin:/usr/sbin:/bin', - command => "visudo -c -f ${sudo::configfile}", - returns => 0, - onlyif => "test \"${sudo::ensure}\" == \"present\"", - refreshonly => true, - logoutput => 'on_failure', + file { $sudo::configdir: + ensure => 'directory', + owner => $sudo::params::configdir_owner, + group => $sudo::params::configdir_group, + mode => $sudo::params::configdir_mode, + purge => true, + recurse => true, } + } + } + # check the syntax of the sudoers files + exec { $sudo::params::check_syntax_name: + path => '/usr/bin:/usr/sbin:/bin', + command => "visudo -c -f ${sudo::configfile}", + returns => 0, + onlyif => "test \"${sudo::ensure}\" == \"present\"", + refreshonly => true, + logoutput => 'on_failure', } - else - { - # here $sudo::ensure is 'absent' - - # # Restore old sudoers file (if it exists) - # exec { "restore ${sudo::configfile}": - # command => "mv ${sudo::params::backupconfigfile} ${sudo::configfile}" - # path => "/usr/bin:/usr/sbin:/bin", - # onlyif => "test -f ${sudo::params::backupconfigfile}", - # #before => Package['sudo'], - # } - - # Delete /etc/sudoers.d if sudo version >= 1.7.2 - if ($facts['sudoversion'] != undef) { - if versioncmp($facts['sudoversion'],'1.7.1') > 0 { - - file { $sudo::params::configdir: - ensure => 'absent', - force => true, - #purge => true, - #recurse => true, - #onlyif => "test -d ${sudo::params::configdir}", - } - } + } + else { + # here $sudo::ensure is 'absent' + + # # Restore old sudoers file (if it exists) + # exec { "restore ${sudo::configfile}": + # command => "mv ${sudo::params::backupconfigfile} ${sudo::configfile}" + # path => "/usr/bin:/usr/sbin:/bin", + # onlyif => "test -f ${sudo::params::backupconfigfile}", + # #before => Package['sudo'], + # } + + # Delete /etc/sudoers.d if sudo version >= 1.7.2 + if ($facts['sudoversion'] != undef) { + if versioncmp($facts['sudoversion'],'1.7.1') > 0 { + file { $sudo::params::configdir: + ensure => 'absent', + force => true, + #purge => true, + #recurse => true, + #onlyif => "test -d ${sudo::params::configdir}", } + } } - - -} +} } diff --git a/manifests/common/debian.pp b/manifests/common/debian.pp index b0f482f..960d7dd 100644 --- a/manifests/common/debian.pp +++ b/manifests/common/debian.pp @@ -7,4 +7,4 @@ # = Class: sudo::common::debian # # Specialization class for Debian systems -class sudo::common::debian inherits sudo::common { } +class sudo::common::debian inherits sudo::common {} diff --git a/manifests/common/redhat.pp b/manifests/common/redhat.pp index 469b3be..304cc11 100644 --- a/manifests/common/redhat.pp +++ b/manifests/common/redhat.pp @@ -7,4 +7,4 @@ # = Class: sudo::common::debian # # Specialization class for Redhat systems -class sudo::common::redhat inherits sudo::common { } +class sudo::common::redhat inherits sudo::common {} diff --git a/manifests/conf.pp b/manifests/conf.pp index 98f6e06..9f5955d 100644 --- a/manifests/conf.pp +++ b/manifests/conf.pp @@ -52,34 +52,30 @@ # # [Remember: No empty lines between comments and class definition] # -define sudo::conf( - $content = '', - $source = '', - $priority = 0, - $sudo_file_name = '', - $ensure = 'present' -) -{ - if ($sudo_file_name != '') { - $dname = $sudo_file_name - } else { - $dname = $name - } +define sudo::conf ( + $content = '', + $source = '', + $priority = 0, + $sudo_file_name = '', + $ensure = 'present' +) { + if ($sudo_file_name != '') { + $dname = $sudo_file_name + } else { + $dname = $name + } - if ! ($ensure in [ 'present', 'absent' ]) { - fail("sudo::directive 'ensure' parameter must be set to either 'absent', or 'present'") - } - if ($sudo::ensure != $ensure) { - if ($sudo::ensure != 'present') { - fail("Cannot configure the sudo directive '${dname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") - } + if ! ($ensure in ['present', 'absent']) { + fail("sudo::directive 'ensure' parameter must be set to either 'absent', or 'present'") + } + if ($sudo::ensure != $ensure) { + if ($sudo::ensure != 'present') { + fail("Cannot configure the sudo directive '${dname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") } + } - sudo::directive {$dname: - ensure => $ensure, - content => $content, - source => $source, - } - - -} + sudo::directive { $dname: + ensure => $ensure, + content => $content, + source => $source, +} } diff --git a/manifests/defaults/spec.pp b/manifests/defaults/spec.pp index 9006269..6d06b36 100644 --- a/manifests/defaults/spec.pp +++ b/manifests/defaults/spec.pp @@ -56,57 +56,49 @@ # # [Remember: No empty lines between comments and class definition] # -define sudo::defaults::spec( - $content='', - $source='', - $ensure = 'present' +define sudo::defaults::spec ( + $content='', + $source='', + $ensure = 'present' ) { + include sudo::params - include sudo::params + # $name is provided by define invocation + # guid of this entry + $defaultname = $name - # $name is provided by define invocation - # guid of this entry - $defaultname = $name - - if ! ($ensure in [ 'present', 'absent' ]) { - fail("sudo::defaults::spec 'ensure' parameter must be set to either 'absent', or 'present'") - } - if ($sudo::ensure != $ensure) { - if ($sudo::ensure != 'present') { - fail("Cannot configure the sudo default spec '${defaultname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") - } + if ! ($ensure in ['present', 'absent']) { + fail("sudo::defaults::spec 'ensure' parameter must be set to either 'absent', or 'present'") + } + if ($sudo::ensure != $ensure) { + if ($sudo::ensure != 'present') { + fail("Cannot configure the sudo default spec '${defaultname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") } + } - $real_content = $content ? { - '' => undef, - default => $source ? { - '' => $content, - default => undef - } + $real_content = $content ? { + '' => undef, + default => $source ? { + '' => $content, + default => undef } + } - $real_source = $source ? { - '' => undef, - default => $content ? { - '' => $source, - default => undef - } + $real_source = $source ? { + '' => undef, + default => $content ? { + '' => $source, + default => undef } + } - if $sudo::ensure == 'present' { - - concat::fragment { "sudoers_defaults_spec_${defaultname}": - target => $sudo::configfile, - order => 65, - content => $real_content, - source => $real_source, - notify => Exec[$sudo::params::check_syntax_name], - } - + if $sudo::ensure == 'present' { + concat::fragment { "sudoers_defaults_spec_${defaultname}": + target => $sudo::configfile, + order => 65, + content => $real_content, + source => $real_source, + notify => Exec[$sudo::params::check_syntax_name], } + } } - - - - - diff --git a/manifests/directive.pp b/manifests/directive.pp index a08ec34..bffe4ce 100644 --- a/manifests/directive.pp +++ b/manifests/directive.pp @@ -52,92 +52,85 @@ # # [Remember: No empty lines between comments and class definition] # -define sudo::directive( - $content = '', - $source = '', - $ensure = 'present' -) -{ - include sudo::params +define sudo::directive ( + $content = '', + $source = '', + $ensure = 'present' +) { + include sudo::params - # $name is provided by define invocation - # guid of this entry - $dname = $name + # $name is provided by define invocation + # guid of this entry + $dname = $name - if ! ($ensure in [ 'present', 'absent' ]) { - fail("sudo::directive 'ensure' parameter must be set to either 'absent', or 'present'") - } - if ($sudo::ensure != $ensure) { - if ($sudo::ensure != 'present') { - fail("Cannot configure the sudo directive '${dname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") - } + if ! ($ensure in ['present', 'absent']) { + fail("sudo::directive 'ensure' parameter must be set to either 'absent', or 'present'") + } + if ($sudo::ensure != $ensure) { + if ($sudo::ensure != 'present') { + fail("Cannot configure the sudo directive '${dname}' as sudo::ensure is NOT set to present (but ${sudo::ensure})") } + } - # if content is passed, use that, else if source is passed use that - $real_content = $content ? { - '' => undef, - default => $source ? { - '' => "${content}\n", - default => undef - } + # if content is passed, use that, else if source is passed use that + $real_content = $content ? { + '' => undef, + default => $source ? { + '' => "${content}\n", + default => undef } + } - $real_source = $source ? { - '' => undef, - default => $content ? { - '' => $source, - default => undef - } + $real_source = $source ? { + '' => undef, + default => $content ? { + '' => $source, + default => undef } + } - if($facts['sudoversion'] != undef){ - if versioncmp($facts['sudoversion'],'1.7.2') < 0 { - concat::fragment { "sudoers_directive_${dname}": - target => $sudo::configfile, - order => 65, - content => $real_content, - source => $real_source, - notify => Exec[$sudo::params::check_syntax_name], - } + if($facts['sudoversion'] != undef) { + if versioncmp($facts['sudoversion'],'1.7.2') < 0 { + concat::fragment { "sudoers_directive_${dname}": + target => $sudo::configfile, + order => 65, + content => $real_content, + source => $real_source, + notify => Exec[$sudo::params::check_syntax_name], + } + } + else { + if $ensure == 'present' { + # here sudo version >= 1.7.2 + # + # The #includedir directive is present to manage sudoers.d, version >= 1.7.2 + # + file { "${sudo::configdir}/${dname}": + ensure => $ensure, + owner => $sudo::params::configfile_owner, + group => $sudo::params::configfile_group, + mode => $sudo::params::configfile_mode, + content => $real_content, + source => $real_source, + notify => Exec["${sudo::params::check_syntax_name} for ${sudo::params::configdir}/${dname}"], + require => File[$sudo::configdir], + #Package['sudo'], + } + } else { + file { "${sudo::configdir}/${dname}": + ensure => $ensure, } - else - { - if $ensure == 'present' { - # here sudo version >= 1.7.2 - # - # The #includedir directive is present to manage sudoers.d, version >= 1.7.2 - # - file {"${sudo::configdir}/${dname}": - ensure => $ensure, - owner => $sudo::params::configfile_owner, - group => $sudo::params::configfile_group, - mode => $sudo::params::configfile_mode, - content => $real_content, - source => $real_source, - notify => Exec["${sudo::params::check_syntax_name} for ${sudo::params::configdir}/${dname}"], - require => File[$sudo::configdir], - #Package['sudo'], - } - } else { - file {"${sudo::configdir}/${dname}": - ensure => $ensure, - } - } - if $sudo::ensure == 'present' { - # check the syntax of the created files, delete it if the syntax is wrong - exec {"${sudo::params::check_syntax_name} for ${sudo::params::configdir}/${dname}": - path => '/usr/bin:/usr/sbin:/bin', - command => "visudo -cf ${sudo::params::configdir}/${dname} ||(rm -f ${sudo::params::configdir}/${dname} && exit 1)", - returns => 0, - logoutput => 'on_failure', - refreshonly => true, - } - } + } + if $sudo::ensure == 'present' { + # check the syntax of the created files, delete it if the syntax is wrong + exec { "${sudo::params::check_syntax_name} for ${sudo::params::configdir}/${dname}": + path => '/usr/bin:/usr/sbin:/bin', + command => "visudo -cf ${sudo::params::configdir}/${dname} ||(rm -f ${sudo::params::configdir}/${dname} && exit 1)", + returns => 0, + logoutput => 'on_failure', + refreshonly => true, } + } } + } } - - - - - diff --git a/manifests/init.pp b/manifests/init.pp index b846a26..8919988 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -41,28 +41,26 @@ # # [Remember: No empty lines between comments and class definition] # -class sudo( +class sudo ( $ensure = $sudo::params::ensure, $configfile = $sudo::params::configfile - ) inherits sudo::params -{ - info ("Configuring sudo (with ensure = ${ensure})") +) inherits sudo::params { + info ("Configuring sudo (with ensure = ${ensure})") - if ! ($ensure in [ 'present', 'absent' ]) { - fail("sudo 'ensure' parameter must be set to either 'absent' or 'present'") - } + if ! ($ensure in ['present', 'absent']) { + fail("sudo 'ensure' parameter must be set to either 'absent' or 'present'") + } - $configdir = $configfile ? { - "${sudo::params::configfile}" => $sudo::params::configdir, - default => "${sudo::configfile}.d" - } + $configdir = $configfile ? { + "${sudo::params::configfile}" => $sudo::params::configdir, + default => "${sudo::configfile}.d" + } - case $facts['os']['family'] { - 'Debian': { include sudo::common::debian } - 'RedHat': { include sudo::common::redhat } - default: { - fail("Module ${module_name} is not supported on ${facts['os']['family']}") - } + case $facts['os']['family'] { + 'Debian': { include sudo::common::debian } + 'RedHat': { include sudo::common::redhat } + default: { + fail("Module ${module_name} is not supported on ${facts['os']['family']}") } + } } - diff --git a/manifests/params.pp b/manifests/params.pp index d255963..458face 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -24,71 +24,67 @@ # [Remember: No empty lines between comments and class definition] # class sudo::params { + ######## DEFAULTS FOR VARIABLES USERS CAN SET ########################## + # (Here are set the defaults, provide your custom variables externally) + # (The default used is in the line with '') + ########################################### - ######## DEFAULTS FOR VARIABLES USERS CAN SET ########################## - # (Here are set the defaults, provide your custom variables externally) - # (The default used is in the line with '') - ########################################### + # ensure the presence (or absence) of sudo + $ensure = 'present' - # ensure the presence (or absence) of sudo - $ensure = 'present' + #### MODULE INTERNAL VARIABLES ######### + # (Modify to adapt to unsupported OSes) + ####################################### + $packagename = $facts['os']['name'] ? { + default => 'sudo', + } - #### MODULE INTERNAL VARIABLES ######### - # (Modify to adapt to unsupported OSes) - ####################################### - $packagename = $facts['os']['name'] ? { - default => 'sudo', - } + # The actual version of the package is provided by the + # custore fact 'sudoversion' (see lib/facter/sudo.rb) - # The actual version of the package is provided by the - # custore fact 'sudoversion' (see lib/facter/sudo.rb) + # main configuration file + $configfile = $facts['os']['name'] ? { + default => '/etc/sudoers', + } + # backup of the main configuration file + $backupconfigfile = $facts['os']['name'] ? { + default => '/etc/.sudoers.puppet-save-orig', + } - # main configuration file - $configfile = $facts['os']['name'] ? { - default => '/etc/sudoers', - } - # backup of the main configuration file - $backupconfigfile = $facts['os']['name'] ? { - default => '/etc/.sudoers.puppet-save-orig', - } + $configfile_mode = $facts['os']['name'] ? { + default => '0440', + } - $configfile_mode = $facts['os']['name'] ? { - default => '0440', - } + $configfile_owner = $facts['os']['name'] ? { + default => 'root', + } - $configfile_owner = $facts['os']['name'] ? { - default => 'root', - } + $configfile_group = $facts['os']['name'] ? { + default => 'root', + } - $configfile_group = $facts['os']['name'] ? { - default => 'root', - } + # The next config dir only holds for sudo version >= 1.7.2 + $configdir = $facts['os']['name'] ? { + default => '/etc/sudoers.d', + } + $configdir_mode = $facts['os']['name'] ? { + default => '0755', + } - # The next config dir only holds for sudo version >= 1.7.2 - $configdir = $facts['os']['name'] ? { - default => '/etc/sudoers.d', - } - $configdir_mode = $facts['os']['name'] ? { - default => '0755', - } + $configdir_owner = $facts['os']['name'] ? { + default => 'root', + } - $configdir_owner = $facts['os']['name'] ? { - default => 'root', - } + $configdir_group = $facts['os']['name'] ? { + default => 'root', + } - $configdir_group = $facts['os']['name'] ? { - default => 'root', - } + # name of the exec resource responsible for checking the syntax of the sudoers + # file + $check_syntax_name = 'sudoers-check-syntax' - # name of the exec resource responsible for checking the syntax of the sudoers - # file - $check_syntax_name = 'sudoers-check-syntax' - - $cmdalias_pkgmanager = $facts['os']['name'] ? { - /(?i-mx:ubuntu|debian)/ => [ '/usr/bin/apt-get' ], - /(?i-mx:centos|fedora|redhat|rocky)/ => [ '/bin/rpm', '/usr/bin/up2date', '/usr/bin/yum' ], - default => [] - } - - -} + $cmdalias_pkgmanager = $facts['os']['name'] ? { + /(?i-mx:ubuntu|debian)/ => ['/usr/bin/apt-get'], + /(?i-mx:centos|fedora|redhat|rocky)/ => ['/bin/rpm', '/usr/bin/up2date', '/usr/bin/yum'], + default => [] +} } From a4333ab830bef33ed49a39d150585f85b2b10d4f Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 16:10:19 +0200 Subject: [PATCH 09/10] fix: rubocop warnings in sudo version fact --- lib/facter/sudo.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/facter/sudo.rb b/lib/facter/sudo.rb index 5eea861..278f525 100644 --- a/lib/facter/sudo.rb +++ b/lib/facter/sudo.rb @@ -1,9 +1,13 @@ +# frozen_string_literal: true + +require 'English' + Facter.add('sudoversion') do confine kernel: 'Linux' setcode do ENV['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin' output = `sudo -V 2>&1` - if $?.exitstatus.zero? + if $CHILD_STATUS.exitstatus.zero? m = %r{Sudo version ([\d.]+)}.match output m[1] if m end From f7b0c675cc45a214213da54404f1008f7ae58f07 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 16:35:06 +0200 Subject: [PATCH 10/10] docs: update the README file --- README.md | 44 ++++++++------------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index cf7b52e..e00f160 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ --*- mode: markdown; mode: visual-line; -*- - # Sudo Puppet Module [![Puppet Forge](http://img.shields.io/puppetforge/v/ULHPC/sudo.svg)](https://forge.puppetlabs.com/ULHPC/sudo) @@ -8,7 +6,7 @@ Configure and manage sudo and sudoers files - Copyright (c) 2020 UL HPC Team + Copyright (c) 2026 UL HPC Team | [Project Page](https://github.com/ULHPC/puppet-sudo) | [Sources](https://github.com/ULHPC/puppet-sudo) | [Issues](https://github.com/ULHPC/puppet-sudo/issues) | @@ -37,9 +35,6 @@ This module implements the following elements: All these components are configured through a set of variables you will find in [`manifests/params.pp`](manifests/params.pp). -_Note_: the various operations that can be conducted from this repository are piloted from a [`Rakefile`](https://github.com/ruby/rake) and assumes you have a running [Ruby](https://www.ruby-lang.org/en/) installation. -See `docs/contributing.md` for more details on the steps you shall follow to have this `Rakefile` working properly. - ## Dependencies See [`metadata.json`](metadata.json). In particular, this module depends on @@ -56,8 +51,6 @@ Use it as follows: include ' sudo' -See also [`tests/init.pp`](tests/init.pp) - ### Definition `sudo::directive` The definition `sudo::directive` provides a simple way to write sudo configurations parts. @@ -82,9 +75,6 @@ Example: On recent version of sudo, this will typically create a new file `/etc/sudoers.d/admin_users` (or `/etc/sudoers.d/vagrant`). -See also [`tests/directive.pp`](tests/directive.pp) - - ### Definition `sudo::alias::command` Permits to define a command alias in the `sudoers` files (directive `Cmnd_Alias`) @@ -106,8 +96,6 @@ This will create the following entry in the sudoers files: ## Networking Cmnd_Alias NETWORK = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /sbin/iptables -See also [`tests/alias/command.pp`](tests/alias/command.pp) - ### Definition `sudo::alias::user` Permits to define a user alias in the sudoers files (directive User_Alias) @@ -130,9 +118,6 @@ This will create the following entry in the `sudoers` files: User_Alias ADMINS = jsmith, mikem -See also [`tests/alias/user.pp`](tests/alias/user.pp) - - ### Definition `sudo::defaults::spec` Permits to define a default specifications @@ -163,41 +148,28 @@ Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES Defaults env_keep += "LC_TIME LC_ALL LANGUAGE" ``` -See also [`tests/defaults/spec.pp`](tests/defaults/spec.pp) - - ## Librarian-Puppet / R10K Setup You can of course configure the sudo module in your `Puppetfile` to make it available with [Librarian puppet](http://librarian-puppet.com/) or [r10k](https://github.com/adrienthebo/r10k) by adding the following entry: # Modules from the Puppet Forge - mod "ULHPC-sudo" + mod "ULHPC/sudo" or, if you prefer to work on the git version: - mod "ULHPC-sudo", + mod "ULHPC/sudo", :git => 'https://github.com/ULHPC/puppet-sudo', - :ref => 'production' - -## Issues / Feature request - -You can submit bug / issues / feature request using the [ULHPC-sudo Puppet Module Tracker](https://github.com/ULHPC/puppet-sudo/issues). + :ref => 'main' -## Developments / Contributing to the code +## Developments / Issues / Contributing to the code -If you want to contribute to the code, you shall be aware of the way this module is organized. -These elements are detailed on [`docs/contributing.md`](contributing/index.md). +This Puppet Module has been implemented in the context of the [UL HPC](http://hpc.uni.lu) Platform of the [University of Luxembourg](http://www.uni.lu). +It relies on [Vox Pupuli modulesync](https://github.com/voxpupuli/modulesync) for its organization. +You can submit bugs / issues / feature requests using the [ULHPC-sudo Puppet Module Tracker](https://github.com/ULHPC/puppet-sudo/issues). You are more than welcome to contribute to its development by [sending a pull request](https://help.github.com/articles/using-pull-requests). -## Puppet modules tests within a Vagrant box - -The best way to test this module in a non-intrusive way is to rely on [Vagrant](http://www.vagrantup.com/). -The `Vagrantfile` at the root of the repository pilot the provisioning various vagrant boxes available on [Vagrant cloud](https://atlas.hashicorp.com/boxes/search?utf8=%E2%9C%93&sort=&provider=virtualbox&q=svarrette) you can use to test this module. - -See [`docs/vagrant.md`](vagrant.md) for more details. - ## Licence This project and the sources proposed within this repository are released under the terms of the [GPL-3.0](LICENCE) licence.