From ac7fb1902aa2e5be757bca82d41753320a60c03f Mon Sep 17 00:00:00 2001 From: ulhpc-bot <282622861+ULHPC-bot@users.noreply.github.com> Date: Thu, 7 May 2026 15:15:11 +0000 Subject: [PATCH 1/6] 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 | 30 ++++++++-- .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(+), 94 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 bdfa39c..adea1b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,25 @@ -.DS_Store -.vagrant -/.bundle/* -.falkor* -/pkg/* +# 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..ae7bed9 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-kernel' +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 fc27b30649a126bcded6fc6c5f826ff220517b2f Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 15:34:43 +0200 Subject: [PATCH 2/6] 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 2974be4..f288702 100644 --- a/LICENSE +++ b/LICENSE @@ -1,18 +1,7 @@ -Copyright (C) 2015 S., Varrette,, H., Cartiaux,, V., Plugaru,, S., Diehl, aka., UL, HPC, Management, Team - -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 0b3af19bf24b66d6ba7918d862357f99336e5622 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 15:42:26 +0200 Subject: [PATCH 3/6] refactor: remove obsoleted files --- .ruby-gemset | 1 - Gemfile.lock | 325 -------------------------------- Vagrantfile | 50 ----- docs/contacts.md | 10 - docs/contributing/index.md | 14 -- docs/contributing/layout.md | 32 ---- docs/contributing/setup.md | 53 ------ docs/contributing/versioning.md | 30 --- docs/index.md | 31 --- docs/overview.md | 1 - docs/rtfd.md | 9 - docs/vagrant.md | 59 ------ mkdocs.yml | 12 -- tests/init.pp | 23 --- tests/params.pp | 29 --- 15 files changed, 679 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/init.pp delete mode 100644 tests/params.pp 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 480c8d1..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,50 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! -VAGRANTFILE_API_VERSION = "2" - -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - # Inspired by [puppet-playground](https://github.com/example42/puppet-playground/blob/master/Vagrantfile) - #config.cache.auto_detect = true - - # (nearly) All below boxes were generated using [vagrant-vms](https://github.com/Falkor/vagrant-vms/) - { - :centos_7 => { - :box => "svarrette/centos-7", - :url => "https://atlas.hashicorp.com/svarrette/boxes/centos-7" - }, - :debian_7 => { - :box => "svarrette/debian-7-puppet", - :url => "https://atlas.hashicorp.com/svarrette/debian-7-puppet", - :primary => true - } - }.each do |name,cfg| - boxname = name.to_s.downcase.gsub(/_/, '-') - config.vm.define boxname, :autostart => (! cfg[:primary].nil?), :primary => cfg[:primary] do |local| - #local.vm.primary = true if cfg[:primary] - local.vm.box = cfg[:box] - local.vm.host_name = ENV['VAGRANT_HOSTNAME'] || name.to_s.downcase.gsub(/_/, '-').concat(".vagrant.com") - #config.vm.box_check_update = false - local.vm.provision "shell", path: ".vagrant_init.rb" - # local.vm.provision :puppet do |puppet| - # puppet.hiera_config_path = 'data/hiera.yaml' - # puppet.working_directory = '/vagrant' - # puppet.manifests_path = "manifests" - # puppet.module_path = "modules" - # puppet.manifest_file = "init.pp" - # puppet.options = [ - # '--verbose', - # '--report', - # '--show_diff', - # '--pluginsync', - # '--summarize', - # # '--evaltrace', - # # '--debug', - # # '--parser future', - # ] - # end - end - end -end - diff --git a/docs/contacts.md b/docs/contacts.md deleted file mode 100644 index 2722805..0000000 --- a/docs/contacts.md +++ /dev/null @@ -1,10 +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 Management Team](https://hpc.uni.lu/about/team.html#system-administrators) took care of this development for this module. - -You can submit bug / issues / feature request using the [ULHPC/kernel Puppet Module Tracker](https://github.com/ULHPC/puppet-kernel/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 9fabba8..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 kernel::* 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/kernel) -├── 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 e2bd979..0000000 --- a/docs/contributing/setup.md +++ /dev/null @@ -1,53 +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 f3a8500..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 65aae89..0000000 --- a/docs/index.md +++ /dev/null @@ -1,31 +0,0 @@ --*- mode: markdown; mode: visual-line; -*- - -# ULHPC/kernel Puppet Module - -[![Puppet Forge](http://img.shields.io/puppetforge/v/ULHPC/kernel.svg)](https://forge.puppetlabs.com/ULHPC/kernel) -[![License](http://img.shields.io/:license-GPL3.0-blue.svg)](LICENSE) -![Supported Platforms](http://img.shields.io/badge/platform-debian-lightgrey.svg) -[![Documentation Status](https://readthedocs.org/projects/ulhpc-puppet-kernel/badge/?version=latest)](https://readthedocs.org/projects/ulhpc-puppet-kernel/?badge=latest) - - Copyright (c) 2015 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team - -| [Project Page](https://github.com/ULHPC/puppet-kernel) | [Documentation](http://ulhpc-puppet-kernel.readthedocs.org/en/latest/) | [Issues](https://github.com/ULHPC/puppet-kernel/issues) | - - ------------ -The [ULHPC/kernel](https://github.com/ULHPC/puppet-kernel) puppet module has been designed to configure various aspects of linux kernel (modules etc.) - -This is the main page of the documentation for this Puppet module, which is hosted and managed by [Read the Docs](http://ulhpc-kernel.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-kernel.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 e3dc685..0000000 --- a/docs/vagrant.md +++ /dev/null @@ -1,59 +0,0 @@ --*- mode: markdown; mode: visual-line; -*- - -# Kernel 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 of many vagrant boxes generated through the [vagrant-vms](https://github.com/falkor/vagrant-vms) repository and available on [Vagrant cloud](https://atlas.hashicorp.com/boxes/search?utf8=%E2%9C%93&sort=&provider=virtualbox&q=svarrette). - -You can list the available vagrant box as follows: - - $> vagrant status - Current machine states: - - centos-7 not created (virtualbox) - debian-7 not created (virtualbox) - - This environment represents multiple VMs. The VMs are all listed - above with their current state. For more information about a specific - VM, run `vagrant status NAME`. - -As suggested, you can run a debian 7 machine for instance by issuing: - - $> vagrant up debian-7 - -Then you can ssh into the machine afterwards: - - $> vagrant ssh debian-7 - -When you run `vagrant up ` to boot the VM, it is configured to be provisioned with the `.vagrant_init.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 d60f8bc..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,12 +0,0 @@ -site_name: ULHPC/kernel Puppet Module -pages: -- ['index.md', 'Home'] -- ['overview.md', 'Overview'] -- ['vagrant.md', 'Tests with Vagrant'] -- ['contributing/index.md', 'Contributing', 'Overview'] -- ['contributing/layout.md', 'Contributing', 'Directory Layout'] -- ['contributing/setup.md', 'Contributing', 'Repository Setup and Developments'] -- ['contributing/versioning.md', 'Contributing', 'Module Versioning'] -- ['rtfd.md', 'Documentation', 'RTFD'] -- ['contacts.md', 'Contacts'] -theme: readthedocs diff --git a/tests/init.pp b/tests/init.pp deleted file mode 100644 index b85b3b1..0000000 --- a/tests/init.pp +++ /dev/null @@ -1,23 +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 { - include kernel - kernel::module { 'bridge': - ensure => 'present', - } -} diff --git a/tests/params.pp b/tests/params.pp deleted file mode 100644 index e2232b8..0000000 --- a/tests/params.pp +++ /dev/null @@ -1,29 +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) 2015 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 'kernel::params' - -$names = ['modulefile', 'modulefile_mode', 'modulefile_owner', 'modulefile_group', 'modprobe'] - -notice("kernel::params::modulefile = ${kernel::params::modulefile}") -notice("kernel::params::modulefile_mode = ${kernel::params::modulefile_mode}") -notice("kernel::params::modulefile_owner = ${kernel::params::modulefile_owner}") -notice("kernel::params::modulefile_group = ${kernel::params::modulefile_group}") -notice("kernel::params::modprobe = ${kernel::params::modprobe}") - -#each($names) |$v| { -# $var = "kernel::params::${v}" -# notice("${var} = ", inline_template('<%= scope.lookupvar(@var) %>')) -#} From ad1845a0e940e7d9342e52d70bf5109acd2190fc Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 16:03:46 +0200 Subject: [PATCH 4/6] chore: modernize metadata.json --- metadata.json | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/metadata.json b/metadata.json index 45aa306..5096bed 100644 --- a/metadata.json +++ b/metadata.json @@ -2,44 +2,60 @@ "name": "ULHPC-kernel", "version": "0.0.5", "author": "UL HPC Team", - "mail": "hpc-sysadmins@uni.lu", "summary": "Configure various aspects of Linux kernel (modules etc.)", - "description": "Configure various aspects of Linux kernel (modules etc.)", "license": "GPL-3.0", "source": "https://github.com/ULHPC/puppet-kernel", - "docs_project": "ulhpc-puppet-kernel", "project_page": "https://github.com/ULHPC/puppet-kernel", "issues_url": "https://github.com/ULHPC/puppet-kernel/issues", - "forge_url": "https://forge.puppetlabs.com/ULHPC/kernel", "dependencies": [ { "name": "puppetlabs-stdlib", - "version_requirement": ">=4.2.2 <5.0.0" + "version_requirement": ">=4.2.2 <10.0.0" } ], "operatingsystem_support": [ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "6", + "11", + "12", + "13" + ] + }, + { + "operatingsystem": "RedHat", + "operatingsystemrelease": [ + "7", + "8", + "9", + "10" + ] + }, + { + "operatingsystem": "Rocky", + "operatingsystemrelease": [ + "8", + "9", + "10" + ] + }, + { + "operatingsystem": "CentOS", + "operatingsystemrelease": [ "7" ] } ], + "requirements": [ + { + "name": "puppet", + "version_requirement": ">= 8.0.0 < 9.0.0" + } + ], "tags": [ "os", "linux", "kernel", "modprobe" - ], - "classes": [ - "kernel", - "kernel::common", - "kernel::common::debian", - "kernel::common::redhat", - "kernel::params" - ], - "definitions": [ - "kernel::module" ] } From dc7d4bacfea97c1732fae01f2dfd3eebcafd2d44 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 16:08:14 +0200 Subject: [PATCH 5/6] refactor: lint --- manifests/common.pp | 17 +++---- manifests/common/debian.pp | 2 +- manifests/common/redhat.pp | 2 +- manifests/init.pp | 17 +++---- manifests/module.pp | 102 ++++++++++++++++++------------------- manifests/params.pp | 76 +++++++++++++-------------- 6 files changed, 102 insertions(+), 114 deletions(-) diff --git a/manifests/common.pp b/manifests/common.pp index b61bd1e..5b03931 100644 --- a/manifests/common.pp +++ b/manifests/common.pp @@ -10,14 +10,13 @@ # # Note: respect the Naming standard provided here[http://projects.puppetlabs.com/projects/puppet/wiki/Module_Standards] class kernel::common { + # Load the variables used in this module. Check the kernel-params.pp file + require kernel::params - # Load the variables used in this module. Check the kernel-params.pp file - require kernel::params - - file { $kernel::params::modulefile: - ensure => 'file', - owner => $kernel::params::modulefile_owner, - group => $kernel::params::modulefile_group, - mode => $kernel::params::modulefile_mode, - } + file { $kernel::params::modulefile: + ensure => 'file', + owner => $kernel::params::modulefile_owner, + group => $kernel::params::modulefile_group, + mode => $kernel::params::modulefile_mode, + } } diff --git a/manifests/common/debian.pp b/manifests/common/debian.pp index 36eb132..8882009 100644 --- a/manifests/common/debian.pp +++ b/manifests/common/debian.pp @@ -7,4 +7,4 @@ # = Class: kernel::common::debian # # Specialization class for Debian systems -class kernel::common::debian inherits kernel::common { } +class kernel::common::debian inherits kernel::common {} diff --git a/manifests/common/redhat.pp b/manifests/common/redhat.pp index 6f49bc8..e53be75 100644 --- a/manifests/common/redhat.pp +++ b/manifests/common/redhat.pp @@ -7,4 +7,4 @@ # = Class: kernel::common::redhat # # Specialization class for Redhat systems -class kernel::common::redhat inherits kernel::common { } +class kernel::common::redhat inherits kernel::common {} diff --git a/manifests/init.pp b/manifests/init.pp index 52b0d1b..003107a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -29,15 +29,14 @@ # # [Remember: No empty lines between comments and class definition] # -class kernel inherits kernel::params -{ - info ('Configuring GNU/linux kernel') +class kernel inherits kernel::params { + info ('Configuring GNU/linux kernel') - case $facts['os']['name'] { - 'debian', 'ubuntu': { include kernel::common::debian } - 'redhat', 'fedora', 'centos', 'rocky': { include kernel::common::redhat } - default: { - fail("Module ${module_name} is not supported on ${facts['os']['name']}") - } + case $facts['os']['name'] { + 'debian', 'ubuntu': { include kernel::common::debian } + 'redhat', 'fedora', 'centos', 'rocky': { include kernel::common::redhat } + default: { + fail("Module ${module_name} is not supported on ${facts['os']['name']}") } + } } diff --git a/manifests/module.pp b/manifests/module.pp index 7ce898e..ceee5a4 100644 --- a/manifests/module.pp +++ b/manifests/module.pp @@ -28,68 +28,64 @@ # [Remember: No empty lines between comments and class definition] # define kernel::module ($ensure = 'present') { + # Check the value of teh ensure parameter + if ! ($ensure in ['present', 'absent']) { + fail("kernel::module 'ensure' parameter must be either absent or present") + } - # Check the value of teh ensure parameter - if ! ($ensure in [ 'present', 'absent' ]) { - fail("kernel::module 'ensure' parameter must be either absent or present") - } + include kernel + include kernel::params - include kernel - include kernel::params + # $name is provided by define invocation + # guid of this entry + $modulename = $name - # $name is provided by define invocation - # guid of this entry - $modulename = $name + $insert_module_cmd = $facts['os']['name'] ? { + /(?i-mx:ubuntu|debian)/ => "echo '${modulename}' >> '${kernel::params::modulefile}'", + /(?i-mx:centos|fedora|redhat|rocky)/ => "echo '${kernel::params::modprobe} ${modulename}' >> '${kernel::params::modulefile}' ", + } - $insert_module_cmd = $facts['os']['name'] ? { - /(?i-mx:ubuntu|debian)/ => "echo '${modulename}' >> '${kernel::params::modulefile}'", - /(?i-mx:centos|fedora|redhat|rocky)/ => "echo '${kernel::params::modprobe} ${modulename}' >> '${kernel::params::modulefile}' ", - } + $remove_module_cmd = $facts['os']['name'] ? { + /(?i-mx:ubuntu|debian)/ => "perl -ni -e 'print unless /^\\Q${modulename}\\E\$/' '${kernel::params::modulefile}'", + /(?i-mx:centos|fedora|redhat|rocky)/ => "perl -ni -e 'print unless /^\\Q${kernel::params::modprobe} ${modulename}\\E\$/' '${kernel::params::modulefile}'", + } - $remove_module_cmd = $facts['os']['name'] ? { - /(?i-mx:ubuntu|debian)/ => "perl -ni -e 'print unless /^\\Q${modulename}\\E\$/' '${kernel::params::modulefile}'", - /(?i-mx:centos|fedora|redhat|rocky)/ => "perl -ni -e 'print unless /^\\Q${kernel::params::modprobe} ${modulename}\\E\$/' '${kernel::params::modulefile}'", - } - - $insert_unless_cmd = $facts['os']['name'] ? { - /(?i-mx:ubuntu|debian)/ => "grep -qFx '${modulename}' '${kernel::params::modulefile}'", - /(?i-mx:centos|fedora|redhat|rocky)/ => "grep -q '^${kernel::params::modprobe} ${modulename}\$' '${kernel::params::modulefile}'", - } + $insert_unless_cmd = $facts['os']['name'] ? { + /(?i-mx:ubuntu|debian)/ => "grep -qFx '${modulename}' '${kernel::params::modulefile}'", + /(?i-mx:centos|fedora|redhat|rocky)/ => "grep -q '^${kernel::params::modprobe} ${modulename}\$' '${kernel::params::modulefile}'", + } - # Let's go - info("managing kernel module '${modulename}' (with ensure = ${ensure})") + # Let's go + info("managing kernel module '${modulename}' (with ensure = ${ensure})") - if ($ensure == 'present'){ - # Add the module in the modulefile (/etc/modules typically) - exec { "insert_module_${modulename}": - path => '/sbin:/usr/bin:/usr/sbin:/bin', - command => $insert_module_cmd, - unless => $insert_unless_cmd, - } + if ($ensure == 'present') { + # Add the module in the modulefile (/etc/modules typically) + exec { "insert_module_${modulename}": + path => '/sbin:/usr/bin:/usr/sbin:/bin', + command => $insert_module_cmd, + unless => $insert_unless_cmd, + } - # Now run modprobe command - exec { "modprobe ${modulename}": - path => '/sbin:/usr/bin:/usr/sbin:/bin', - command => "${kernel::params::modprobe} ${modulename}", - unless => "/bin/grep -q '^${modulename} ' '/proc/modules'", - } + # Now run modprobe command + exec { "modprobe ${modulename}": + path => '/sbin:/usr/bin:/usr/sbin:/bin', + command => "${kernel::params::modprobe} ${modulename}", + unless => "/bin/grep -q '^${modulename} ' '/proc/modules'", + } + } + else { + # First run modprobe to unload the module + exec { "modprobe -r ${modulename}": + path => '/sbin:/usr/bin:/usr/sbin:/bin', + command => "${kernel::params::modprobe} -r ${modulename}", + onlyif => "/bin/grep -q '^${modulename} ' '/proc/modules'", } - else - { - # First run modprobe to unload the module - exec { "modprobe -r ${modulename}": - path => '/sbin:/usr/bin:/usr/sbin:/bin', - command => "${kernel::params::modprobe} -r ${modulename}", - onlyif => "/bin/grep -q '^${modulename} ' '/proc/modules'", - } - # Now remove the module from the modulefile (/etc/modules typically) - exec { "remove_module_${modulename}": - path => '/sbin:/usr/bin:/usr/sbin:/bin', - command => $remove_module_cmd, - onlyif => $insert_unless_cmd, - } + # Now remove the module from the modulefile (/etc/modules typically) + exec { "remove_module_${modulename}": + path => '/sbin:/usr/bin:/usr/sbin:/bin', + command => $remove_module_cmd, + onlyif => $insert_unless_cmd, } + } } - - diff --git a/manifests/params.pp b/manifests/params.pp index 586ab06..293b2f1 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -23,44 +23,38 @@ # [Remember: No empty lines between comments and class definition] # class kernel::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 '') - ########################################### - - - #### MODULE INTERNAL VARIABLES ######### - # (Modify to adapt to unsupported OSes) - ####################################### - $modulefile = $facts['os']['name'] ? { - /(?i-mx:ubuntu|debian)/ => '/etc/modules', - default => '/etc/rc.modules', - } - - $modulefile_mode = $facts['os']['name'] ? { - /(?i-mx:centos|fedora|redhat|rocky)/ => '0755', - default => '0644', - } - - $modulefile_owner = $facts['os']['name'] ? { - default => 'root', - } - - $modulefile_group = $facts['os']['name'] ? { - default => 'root', - } - - # $pkgmanager = $::operatingsystem ? { - # /(?i-mx:ubuntu|debian)/ => [ '/usr/bin/apt-get' ], - # /(?i-mx:centos|fedora|redhat|rocky)/ => [ '/bin/rpm', '/usr/bin/up2date', '/usr/bin/yum' ], - # default => [] - # } - - $modprobe = $facts['os']['name'] ? { - default => '/sbin/modprobe' - } - - -} - + ######## DEFAULTS FOR VARIABLES USERS CAN SET ########################## + # (Here are set the defaults, provide your custom variables externally) + # (The default used is in the line with '') + ########################################### + + #### MODULE INTERNAL VARIABLES ######### + # (Modify to adapt to unsupported OSes) + ####################################### + $modulefile = $facts['os']['name'] ? { + /(?i-mx:ubuntu|debian)/ => '/etc/modules', + default => '/etc/rc.modules', + } + + $modulefile_mode = $facts['os']['name'] ? { + /(?i-mx:centos|fedora|redhat|rocky)/ => '0755', + default => '0644', + } + + $modulefile_owner = $facts['os']['name'] ? { + default => 'root', + } + + $modulefile_group = $facts['os']['name'] ? { + default => 'root', + } + + # $pkgmanager = $::operatingsystem ? { + # /(?i-mx:ubuntu|debian)/ => [ '/usr/bin/apt-get' ], + # /(?i-mx:centos|fedora|redhat|rocky)/ => [ '/bin/rpm', '/usr/bin/up2date', '/usr/bin/yum' ], + # default => [] + # } + + $modprobe = $facts['os']['name'] ? { + default => '/sbin/modprobe' +} } From e6e76a138851ba556d193277bf13625a39ebbea8 Mon Sep 17 00:00:00 2001 From: Hyacinthe Cartiaux Date: Wed, 13 May 2026 16:31:31 +0200 Subject: [PATCH 6/6] docs: update the README file --- README.md | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 5f2ac4f..7b2efe6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ --*- mode: markdown; mode: visual-line; -*- - # Kernel Puppet Module [![Puppet Forge](http://img.shields.io/puppetforge/v/ULHPC/kernel.svg)](https://forge.puppetlabs.com/ULHPC/kernel) @@ -8,7 +6,7 @@ Configure various aspects of Linux kernel (modules etc.) - Copyright (c) 2015 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team + Copyright (c) 2026 UL HPC Team | [Project Page](https://github.com/ULHPC/puppet-kernel) | [Sources](https://github.com/ULHPC/puppet-kernel) | [Issues](https://github.com/ULHPC/puppet-kernel/issues) | @@ -32,9 +30,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 @@ -54,9 +49,6 @@ Use it as follows: include ' kernel' -See also [`tests/init.pp`](tests/init.pp) - - ### Definition `kernel::module` The definition `kernel::module` provides ... @@ -72,9 +64,6 @@ Example: ensure => 'present', } -See also [`tests/module.pp`](tests/module.pp) - - ## Librarian-Puppet / R10K Setup You can of course configure the kernel module in your `Puppetfile` to make it available with [Librarian puppet](http://librarian-puppet.com/) or @@ -87,26 +76,19 @@ or, if you prefer to work on the git version: mod "ULHPC/kernel", :git => 'https://github.com/ULHPC/puppet-kernel', - :ref => 'production' - -## Issues / Feature request + :ref => 'main' -You can submit bug / issues / feature request using the [ULHPC/kernel Puppet Module Tracker](https://github.com/ULHPC/puppet-kernel/issues). +## Developments / Issues / Contributing to the code -## Developments / Contributing to the code +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. 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). +You can submit bugs / issues / feature requests using the [ULHPC/kernel Puppet Module Tracker](https://github.com/ULHPC/puppet-kernel/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.