From 3cb4b106a96539779f91cfc9beaedcee360d7897 Mon Sep 17 00:00:00 2001 From: Massimiliano Adamo Date: Sat, 15 Apr 2023 10:33:30 +0200 Subject: [PATCH 01/11] modulesync 5.5.0 --- .github/SECURITY.md | 3 --- .gitignore | 36 ++++++++++++------------- .msync.yml | 2 +- .pmtignore | 64 ++++++++++++++++++++++----------------------- Gemfile | 3 +-- Rakefile | 36 +++---------------------- 6 files changed, 56 insertions(+), 88 deletions(-) delete mode 100644 .github/SECURITY.md diff --git a/.github/SECURITY.md b/.github/SECURITY.md deleted file mode 100644 index cacadf2..0000000 --- a/.github/SECURITY.md +++ /dev/null @@ -1,3 +0,0 @@ -# Vox Pupuli Security Policy - -Our vulnerabilities reporting process is at https://voxpupuli.org/security/ diff --git a/.gitignore b/.gitignore index 9b95224..84fd904 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,23 @@ # 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 +/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 +/.yardoc/ +/Guardfile diff --git a/.msync.yml b/.msync.yml index f3156d1..a4b0069 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.4.0' +modulesync_config_version: '5.5.0' diff --git a/.pmtignore b/.pmtignore index 65f5051..58a0408 100644 --- a/.pmtignore +++ b/.pmtignore @@ -1,37 +1,37 @@ # 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 +/docs/ +/pkg/ +/Gemfile +/Gemfile.lock +/Gemfile.local +/vendor/ +/.vendor/ +/spec/ +/Rakefile +/.vagrant/ +/.bundle/ +/.ruby-version +/coverage/ +/log/ +/.idea/ +/.dependencies/ +/.github/ +/.librarian/ +/Puppetfile.lock *.iml -.editorconfig -.fixtures.yml -.gitignore -.msync.yml -.overcommit.yml -.pmtignore -.rspec -.rspec_parallel -.rubocop.yml -.sync.yml +/.editorconfig +/.fixtures.yml +/.gitignore +/.msync.yml +/.overcommit.yml +/.pmtignore +/.rspec +/.rspec_parallel +/.rubocop.yml +/.sync.yml .*.sw? -.yardoc/ -.yardopts -Dockerfile +/.yardoc/ +/.yardopts +/Dockerfile diff --git a/Gemfile b/Gemfile index b3827ba..15313c3 100644 --- a/Gemfile +++ b/Gemfile @@ -21,8 +21,7 @@ end group :release do gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' - gem 'voxpupuli-release', '>= 1.2.0', :require => false - gem 'puppet-strings', '>= 2.2', :require => false + gem 'voxpupuli-release', '~> 2.0', :require => false end gem 'rake', :require => false diff --git a/Rakefile b/Rakefile index d8f5eb8..362ad1f 100644 --- a/Rakefile +++ b/Rakefile @@ -24,6 +24,10 @@ end begin require 'voxpupuli/release/rake_tasks' rescue LoadError + # voxpupuli-release not present +else + GCGConfig.user = 'voxpupuli' + GCGConfig.project = 'puppet-rhsm' end desc "Run main 'test' task and report merged results to coveralls" @@ -37,36 +41,4 @@ task test_with_coveralls: [:test] do end end -desc 'Generate REFERENCE.md' -task :reference, [:debug, :backtrace] do |t, args| - patterns = '' - Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace]) -end - -begin - require 'github_changelog_generator/task' - require 'puppet_blacksmith' - GitHubChangelogGenerator::RakeTask.new :changelog do |config| - metadata = Blacksmith::Modulefile.new - config.future_release = "v#{metadata.version}" if metadata.version =~ /^\d+\.\d+.\d+$/ - config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module." - config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog} - config.user = 'voxpupuli' - config.project = 'puppet-rhsm' - end - - # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715 - require 'rbconfig' - if RbConfig::CONFIG['host_os'] =~ /linux/ - task :changelog do - puts 'Fixing line endings...' - changelog_file = File.join(__dir__, 'CHANGELOG.md') - changelog_txt = File.read(changelog_file) - new_contents = changelog_txt.gsub(%r{\r\n}, "\n") - File.open(changelog_file, "w") {|file| file.puts new_contents } - end - end - -rescue LoadError -end # vim: syntax=ruby From d150807bea60a9bdb4174234d48d059e3cd703d1 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 17 Apr 2023 09:12:42 +0200 Subject: [PATCH 02/11] Regenerate REFERENCE.md --- REFERENCE.md | 159 +++++++++++++++++++++++++++------------------------ 1 file changed, 84 insertions(+), 75 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index f2e6744..d5326f0 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -44,68 +44,69 @@ rhsm::rh_password: mypassword The following parameters are available in the `rhsm` class: -* [`rh_user`](#rh_user) -* [`rh_password`](#rh_password) -* [`org`](#org) -* [`activationkey`](#activationkey) -* [`servername`](#servername) -* [`serverprefix`](#serverprefix) -* [`serverport`](#serverport) -* [`ca_cert_dir`](#ca_cert_dir) -* [`repo_ca_cert_filename`](#repo_ca_cert_filename) -* [`repo_ca_cert_source`](#repo_ca_cert_source) -* [`manage_repos`](#manage_repos) -* [`full_refresh_on_yum`](#full_refresh_on_yum) -* [`proxy_hostname`](#proxy_hostname) -* [`proxy_scheme`](#proxy_scheme) -* [`proxy_port`](#proxy_port) -* [`proxy_user`](#proxy_user) -* [`proxy_password`](#proxy_password) -* [`no_proxy`](#no_proxy) -* [`baseurl`](#baseurl) -* [`package_ensure`](#package_ensure) -* [`enabled_repo_ids`](#enabled_repo_ids) -* [`server_timeout`](#server_timeout) -* [`inotify`](#inotify) -* [`process_timeout`](#process_timeout) -* [`repo_filename`](#repo_filename) -* [`plugin_settings`](#plugin_settings) -* [`package_profile_on_trans`](#package_profile_on_trans) - -##### `rh_user` +* [`rh_user`](#-rhsm--rh_user) +* [`rh_password`](#-rhsm--rh_password) +* [`org`](#-rhsm--org) +* [`activationkey`](#-rhsm--activationkey) +* [`servername`](#-rhsm--servername) +* [`serverprefix`](#-rhsm--serverprefix) +* [`serverport`](#-rhsm--serverport) +* [`ca_cert_dir`](#-rhsm--ca_cert_dir) +* [`repo_ca_cert_filename`](#-rhsm--repo_ca_cert_filename) +* [`repo_ca_cert_source`](#-rhsm--repo_ca_cert_source) +* [`manage_repos`](#-rhsm--manage_repos) +* [`full_refresh_on_yum`](#-rhsm--full_refresh_on_yum) +* [`proxy_hostname`](#-rhsm--proxy_hostname) +* [`proxy_scheme`](#-rhsm--proxy_scheme) +* [`proxy_port`](#-rhsm--proxy_port) +* [`proxy_user`](#-rhsm--proxy_user) +* [`proxy_password`](#-rhsm--proxy_password) +* [`no_proxy`](#-rhsm--no_proxy) +* [`baseurl`](#-rhsm--baseurl) +* [`package_ensure`](#-rhsm--package_ensure) +* [`enabled_repo_ids`](#-rhsm--enabled_repo_ids) +* [`server_timeout`](#-rhsm--server_timeout) +* [`inotify`](#-rhsm--inotify) +* [`process_timeout`](#-rhsm--process_timeout) +* [`manage_repo_filename`](#-rhsm--manage_repo_filename) +* [`repo_filename`](#-rhsm--repo_filename) +* [`plugin_settings`](#-rhsm--plugin_settings) +* [`package_profile_on_trans`](#-rhsm--package_profile_on_trans) + +##### `rh_user` Data type: `Optional[String[1]]` User for the Customer Portal. You need to specify either (rh_user and rh_password) or (org and activationkey) -Default value: ``undef`` +Default value: `undef` -##### `rh_password` +##### `rh_password` Data type: `Optional[String[1]]` Password for the rh_user account -Default value: ``undef`` +Default value: `undef` -##### `org` +##### `org` Data type: `Optional[String[1]]` Organization to use -Default value: ``undef`` +Default value: `undef` -##### `activationkey` +##### `activationkey` Data type: `Optional[String[1]]` Activationkey to use -Default value: ``undef`` +Default value: `undef` -##### `servername` +##### `servername` Data type: `Stdlib::Fqdn` @@ -114,7 +115,7 @@ Used directly in rhsm.conf template Default value: `'subscription.rhsm.redhat.com'` -##### `serverprefix` +##### `serverprefix` Data type: `Stdlib::Absolutepath` @@ -125,7 +126,7 @@ Used directly in rhsm.conf template Default value: `'/subscription'` -##### `serverport` +##### `serverport` Data type: `Stdlib::Port` @@ -134,7 +135,7 @@ Used directly in rhsm.conf template Default value: `443` -##### `ca_cert_dir` +##### `ca_cert_dir` Data type: `Stdlib::Absolutepath` @@ -142,7 +143,7 @@ Server CA certificate location Default value: `'/etc/rhsm/ca/'` -##### `repo_ca_cert_filename` +##### `repo_ca_cert_filename` Data type: `String[1]` @@ -152,16 +153,16 @@ redhat-uep.pem for RHSM Default value: `'redhat-uep.pem'` -##### `repo_ca_cert_source` +##### `repo_ca_cert_source` Data type: `Optional[String[1]]` URI, if set the content is used for CA file resource ${ca_cert_dir}/${repo_ca_cert_filename} Possible values are puppet:, file: and http: -Default value: ``undef`` +Default value: `undef` -##### `manage_repos` +##### `manage_repos` Data type: `Integer[0,1]` @@ -170,7 +171,7 @@ Data type: `Integer[0,1]` Default value: `1` -##### `full_refresh_on_yum` +##### `full_refresh_on_yum` Data type: `Integer[0,1]` @@ -181,15 +182,15 @@ Used directly in rhsm.conf template Default value: `0` -##### `proxy_hostname` +##### `proxy_hostname` Data type: `Optional[Stdlib::Fqdn]` Proxy hostname -Default value: ``undef`` +Default value: `undef` -##### `proxy_scheme` +##### `proxy_scheme` Data type: `Enum['http', 'https']` @@ -197,39 +198,39 @@ Proxy scheme Default value: `'http'` -##### `proxy_port` +##### `proxy_port` Data type: `Optional[Stdlib::Port]` Proxy port -Default value: ``undef`` +Default value: `undef` -##### `proxy_user` +##### `proxy_user` Data type: `Optional[String[1]]` Proxy user -Default value: ``undef`` +Default value: `undef` -##### `proxy_password` +##### `proxy_password` Data type: `Optional[String[1]]` Proxy password -Default value: ``undef`` +Default value: `undef` -##### `no_proxy` +##### `no_proxy` Data type: `Optional[String[1]]` no_proxy definition -Default value: ``undef`` +Default value: `undef` -##### `baseurl` +##### `baseurl` Data type: `Stdlib::Httpurl` @@ -237,7 +238,7 @@ Base URL for rhsm, default provided Default value: `'https://cdn.redhat.com'` -##### `package_ensure` +##### `package_ensure` Data type: `String[1]` @@ -245,7 +246,7 @@ Whether to install subscription-manager, directly passed to the `ensure` param o Default value: `'installed'` -##### `enabled_repo_ids` +##### `enabled_repo_ids` Data type: `Array[String[1]]` @@ -253,7 +254,7 @@ A listing of the Repo IDs to provide to the subscription-manager repo --enable c Default value: `[]` -##### `server_timeout` +##### `server_timeout` Data type: `Integer[0]` @@ -261,7 +262,7 @@ HTTP timeout in seconds Default value: `180` -##### `inotify` +##### `inotify` Data type: `Integer[0,1]` @@ -270,7 +271,7 @@ file system without inotify notification support (e.g. NFS), then disabling inot Default value: `1` -##### `process_timeout` +##### `process_timeout` Data type: `Integer[0]` @@ -278,7 +279,15 @@ The time in seconds we will allow the rhsmd cron job to run before terminating t Default value: `300` -##### `repo_filename` +##### `manage_repo_filename` + +Data type: `Boolean` + +Should puppet try to manage the repo file subscription-manager uses? + +Default value: `true` + +##### `repo_filename` Data type: `Stdlib::Absolutepath` @@ -286,7 +295,7 @@ The name of the repo file subscription-manager uses. Default value: `'/etc/yum.repos.d/redhat.repo'` -##### `plugin_settings` +##### `plugin_settings` Data type: `Hash` @@ -294,7 +303,7 @@ Hash of {section => {key => value } } for the yum/dnf plugin. Default value: `{ 'main' => { 'enabled' => 1 } }` -##### `package_profile_on_trans` +##### `package_profile_on_trans` Data type: `Integer[0,1]` @@ -324,15 +333,15 @@ The basic property that the resource should be in. The following parameters are available in the `rh_repo` type. -* [`name`](#name) -* [`provider`](#provider) +* [`name`](#-rh_repo--name) +* [`provider`](#-rh_repo--provider) -##### `name` +##### `name` namevar -##### `provider` +##### `provider` The specific backend to use for this `rh_repo` resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform. @@ -357,20 +366,20 @@ Default value: `present` The following parameters are available in the `rh_subscription` type. -* [`name`](#name) -* [`provider`](#provider) -* [`serial`](#serial) +* [`name`](#-rh_subscription--name) +* [`provider`](#-rh_subscription--provider) +* [`serial`](#-rh_subscription--serial) -##### `name` +##### `name` namevar -##### `provider` +##### `provider` The specific backend to use for this `rh_subscription` resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform. -##### `serial` +##### `serial` From 84cc0de7d2d090dfdc7466996e782397060d3bcc Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 28 Apr 2023 14:04:25 +0200 Subject: [PATCH 03/11] Drop Puppet 6 support --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 8c18c09..bb295b3 100644 --- a/metadata.json +++ b/metadata.json @@ -16,7 +16,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 6.1.0 < 8.0.0" + "version_requirement": ">= 7.0.0 < 8.0.0" } ], "operatingsystem_support": [ From 6bee0c8d6a6723869a07b7df743e60c2f8b438b0 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 12 May 2023 13:32:18 +0200 Subject: [PATCH 04/11] modulesync 6.0.0 --- .msync.yml | 2 +- Gemfile | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.msync.yml b/.msync.yml index a4b0069..b929160 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '5.5.0' +modulesync_config_version: '6.0.0' diff --git a/Gemfile b/Gemfile index 15313c3..98a04cf 100644 --- a/Gemfile +++ b/Gemfile @@ -4,10 +4,10 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 5.4', :require => false + gem 'voxpupuli-test', '~> 6.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false - gem 'puppet_metadata', '~> 2.0', :require => false + gem 'puppet_metadata', '~> 3.0', :require => false end group :development do @@ -16,18 +16,19 @@ group :development do end group :system_tests do - gem 'voxpupuli-acceptance', '~> 1.0', :require => false + gem 'voxpupuli-acceptance', '~> 2.0', :require => false end group :release do - gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' - gem 'voxpupuli-release', '~> 2.0', :require => false + gem 'github_changelog_generator', '>= 1.16.1', :require => false + gem 'voxpupuli-release', '~> 3.0', :require => false + gem 'faraday-retry', '~> 2.1', :require => false end gem 'rake', :require => false gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] -puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0' +puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24' gem 'puppet', puppetversion, :require => false, :groups => [:test] # vim: syntax=ruby From ead5c47a5308d0d54019af699e10450c9c82ae88 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sat, 1 Jul 2023 15:50:30 +0200 Subject: [PATCH 05/11] puppetlabs/stdlib: Allow 9.x --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index bb295b3..d5f4f5f 100644 --- a/metadata.json +++ b/metadata.json @@ -10,7 +10,7 @@ "dependencies": [ { "name": "puppetlabs-stdlib", - "version_requirement": ">= 4.18.0 < 9.0.0" + "version_requirement": ">= 4.18.0 < 10.0.0" } ], "requirements": [ From 9aa57495588d0200a1977903082690b08c954a2b Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 17 Aug 2023 17:16:11 +0200 Subject: [PATCH 06/11] modulesync 7.0.0 --- .github/CONTRIBUTING.md | 11 +++++++---- .msync.yml | 2 +- Gemfile | 2 +- spec/spec_helper.rb | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8b466cf..6aaa603 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this with: ```sh -BEAKER_setfile=debian11-64 bundle exec rake beaker +BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker ``` -You can replace the string `debian10` with any common operating system. +You can replace the string `debian11` with any common operating system. The following strings are known to work: -* ubuntu1804 * ubuntu2004 -* debian10 +* ubuntu2204 * debian11 * centos7 * centos8 +* centos9 +* almalinux8 +* almalinux9 +* fedora36 For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests). diff --git a/.msync.yml b/.msync.yml index b929160..dd3e957 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '6.0.0' +modulesync_config_version: '7.0.0' diff --git a/Gemfile b/Gemfile index 98a04cf..db21d3b 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org' group :test do - gem 'voxpupuli-test', '~> 6.0', :require => false + gem 'voxpupuli-test', '~> 7.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'puppet_metadata', '~> 3.0', :require => false diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6515b7b..9efb4ae 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,3 +17,4 @@ add_custom_fact name.to_sym, value end end +Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f } From e5b66d76f5147dfd32e894d34c27b13b24a53f2e Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 15 Dec 2023 13:31:39 +0100 Subject: [PATCH 07/11] modulesync 7.2.0 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- .msync.yml | 2 +- .pmtignore | 1 + Gemfile | 8 +++----- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49981e3..05b2863 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,4 +13,4 @@ concurrency: jobs: puppet: name: Puppet - uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v1 + uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15f1721..55324aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ on: jobs: release: name: Release - uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1 + uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2 with: allowed_owner: 'voxpupuli' secrets: diff --git a/.msync.yml b/.msync.yml index dd3e957..f818344 100644 --- a/.msync.yml +++ b/.msync.yml @@ -2,4 +2,4 @@ # Managed by modulesync - DO NOT EDIT # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ -modulesync_config_version: '7.0.0' +modulesync_config_version: '7.2.0' diff --git a/.pmtignore b/.pmtignore index 58a0408..10b9830 100644 --- a/.pmtignore +++ b/.pmtignore @@ -35,3 +35,4 @@ /.yardoc/ /.yardopts /Dockerfile +/HISTORY.md diff --git a/Gemfile b/Gemfile index db21d3b..a4a3b20 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ group :test do gem 'voxpupuli-test', '~> 7.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false - gem 'puppet_metadata', '~> 3.0', :require => false + gem 'puppet_metadata', '~> 3.5', :require => false end group :development do @@ -16,13 +16,11 @@ group :development do end group :system_tests do - gem 'voxpupuli-acceptance', '~> 2.0', :require => false + gem 'voxpupuli-acceptance', '~> 3.0', :require => false end group :release do - gem 'github_changelog_generator', '>= 1.16.1', :require => false - gem 'voxpupuli-release', '~> 3.0', :require => false - gem 'faraday-retry', '~> 2.1', :require => false + gem 'voxpupuli-release', '~> 3.0', :require => false end gem 'rake', :require => false From 832865abfb3f8f5e27de896027553e8c0590efb7 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Mon, 3 Jul 2023 09:29:09 +0200 Subject: [PATCH 08/11] Add Puppet 8 support --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index d5f4f5f..85a17fa 100644 --- a/metadata.json +++ b/metadata.json @@ -16,7 +16,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 7.0.0 < 8.0.0" + "version_requirement": ">= 7.0.0 < 9.0.0" } ], "operatingsystem_support": [ From 14e7c93c46d8976352e7e268c6439b28b813d63e Mon Sep 17 00:00:00 2001 From: Edward Garbade Date: Tue, 31 Jan 2023 14:08:32 -0500 Subject: [PATCH 09/11] Allow subscriptions to be attached via hiera --- REFERENCE.md | 9 +++++++++ manifests/init.pp | 6 ++++++ spec/classes/init_spec.rb | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/REFERENCE.md b/REFERENCE.md index d5326f0..525ff55 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -64,6 +64,7 @@ The following parameters are available in the `rhsm` class: * [`no_proxy`](#-rhsm--no_proxy) * [`baseurl`](#-rhsm--baseurl) * [`package_ensure`](#-rhsm--package_ensure) +* [`enabled_subscription_ids`](#-rhsm--enabled_subscription_ids) * [`enabled_repo_ids`](#-rhsm--enabled_repo_ids) * [`server_timeout`](#-rhsm--server_timeout) * [`inotify`](#-rhsm--inotify) @@ -246,6 +247,14 @@ Whether to install subscription-manager, directly passed to the `ensure` param o Default value: `'installed'` +##### `enabled_subscription_ids` + +Data type: `Array[String[1]]` + +A listing of subscription IDs to provide to the subscription-manager attach --pool command. + +Default value: `[]` + ##### `enabled_repo_ids` Data type: `Array[String[1]]` diff --git a/manifests/init.pp b/manifests/init.pp index 3fb9504..962b40b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -39,6 +39,7 @@ # @param no_proxy no_proxy definition # @param baseurl Base URL for rhsm, default provided # @param package_ensure Whether to install subscription-manager, directly passed to the `ensure` param of the package. +# @param enabled_subscription_ids A listing of subscription IDs to provide to the subscription-manager attach --pool command. # @param enabled_repo_ids A listing of the Repo IDs to provide to the subscription-manager repo --enable command. # @param server_timeout HTTP timeout in seconds # @param inotify Inotify is used for monitoring changes in directories with certificates. When this directory is mounted using a network @@ -85,6 +86,7 @@ Integer[0,1] $manage_repos = 1, Integer[0,1] $full_refresh_on_yum = 0, String[1] $package_ensure = 'installed', + Array[String[1]] $enabled_subscription_ids = [], Array[String[1]] $enabled_repo_ids = [], Integer[0,1] $inotify = 1, Integer[0] $server_timeout = 180, @@ -180,6 +182,10 @@ } } + rh_subscription { $enabled_subscription_ids: + ensure => present, + } + rh_repo { $enabled_repo_ids: ensure => present, } diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 4345dd2..99e30be 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -92,6 +92,24 @@ it { is_expected.to contain_rh_repo('rhel-7-server-optional-rpms') } end + context 'with list of subscriptions to enable' do + let(:params) do + { + rh_password: 'password', + rh_user: 'username', + enabled_subscription_ids: %w[ + 001234567890 + 00123456789a + ] + } + end + + it { is_expected.to have_rh_subscription_resource_count(2) } + + it { is_expected.to contain_rh_subscription('001234567890') } + it { is_expected.to contain_rh_subscription('00123456789a') } + end + context 'with proxy scheme set to https' do let(:params) do { From 453d1f9519ab4b7b8c8ad23330c1faad0f25a2b0 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 19 Dec 2023 17:30:12 +0100 Subject: [PATCH 10/11] Release 5.2.0 --- CHANGELOG.md | 11 +++++++++++ metadata.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd59507..a293b8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module. +## [v5.2.0](https://github.com/voxpupuli/puppet-rhsm/tree/v5.2.0) (2023-12-19) + +[Full Changelog](https://github.com/voxpupuli/puppet-rhsm/compare/v5.1.0...v5.2.0) + +**Implemented enhancements:** + +- Add Puppet 8 support [\#139](https://github.com/voxpupuli/puppet-rhsm/pull/139) ([bastelfreak](https://github.com/bastelfreak)) +- Allow subscriptions to be attached via hiera [\#136](https://github.com/voxpupuli/puppet-rhsm/pull/136) ([tedgarb](https://github.com/tedgarb)) +- add fact for rhsm.available\_repo\_ids [\#133](https://github.com/voxpupuli/puppet-rhsm/pull/133) ([sigbjornaib](https://github.com/sigbjornaib)) +- Add a switch to prevent caring about redhat.repo if needed [\#128](https://github.com/voxpupuli/puppet-rhsm/pull/128) ([jcpunk](https://github.com/jcpunk)) + ## [v5.1.0](https://github.com/voxpupuli/puppet-rhsm/tree/v5.1.0) (2022-07-25) [Full Changelog](https://github.com/voxpupuli/puppet-rhsm/compare/v5.0.0...v5.1.0) diff --git a/metadata.json b/metadata.json index 85a17fa..3ad322b 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppet-rhsm", - "version": "5.1.1-rc0", + "version": "5.2.0", "author": "Vox Pupuli", "summary": "Register with the RedHat Subscription Management", "license": "Apache-2.0", From c9b452d2f48d8a7ae890f71f09c583d780fb8c39 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 19 Dec 2023 17:41:40 +0100 Subject: [PATCH 11/11] [blacksmith] Bump version to 5.2.1-rc0 --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 3ad322b..9a3da0c 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppet-rhsm", - "version": "5.2.0", + "version": "5.2.1-rc0", "author": "Vox Pupuli", "summary": "Register with the RedHat Subscription Management", "license": "Apache-2.0",