Showing with 994 additions and 828 deletions.
  1. +2 −1 .editorconfig
  2. +1 −1 .fixtures.yml
  3. +5 −36 .github/CONTRIBUTING.md
  4. +13 −70 .github/workflows/ci.yml
  5. +14 −21 .github/workflows/release.yml
  6. +3 −0 .gitignore
  7. +4 −1 .msync.yml
  8. +2 −1 .overcommit.yml
  9. +3 −0 .pmtignore
  10. +3 −0 .puppet-lint.rc
  11. +3 −0 .rspec
  12. +3 −0 .rspec_parallel
  13. +3 −0 .rubocop.yml
  14. +0 −2 .yardopts
  15. +30 −0 CHANGELOG.md
  16. +5 −2 Dockerfile
  17. +13 −12 Gemfile
  18. +28 −4 REFERENCE.md
  19. +18 −7 Rakefile
  20. +1 −1 data/family/FreeBSD.yaml
  21. +1 −1 data/family/RedHat.yaml
  22. +4 −0 lib/facter/erl_ssl_path.rb
  23. +3 −1 lib/facter/rabbitmq_clustername.rb
  24. +4 −2 lib/facter/rabbitmq_nodename.rb
  25. +3 −1 lib/facter/rabbitmq_plugins_dirs.rb
  26. +3 −1 lib/facter/rabbitmq_version.rb
  27. +7 −8 lib/puppet/provider/rabbitmq_binding/rabbitmqadmin.rb
  28. +14 −15 lib/puppet/provider/rabbitmq_cli.rb
  29. +3 −1 lib/puppet/provider/rabbitmq_cluster/rabbitmqctl.rb
  30. +3 −1 lib/puppet/provider/rabbitmq_erlang_cookie/ruby.rb
  31. +8 −10 lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb
  32. +4 −1 lib/puppet/provider/rabbitmq_parameter/rabbitmqctl.rb
  33. +3 −0 lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb
  34. +5 −1 lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb
  35. +8 −9 lib/puppet/provider/rabbitmq_queue/rabbitmqadmin.rb
  36. +5 −0 lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb
  37. +6 −11 lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb
  38. +3 −0 lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb
  39. +44 −48 lib/puppet/type/rabbitmq_binding.rb
  40. +17 −15 lib/puppet/type/rabbitmq_cluster.rb
  41. +13 −13 lib/puppet/type/rabbitmq_erlang_cookie.rb
  42. +20 −20 lib/puppet/type/rabbitmq_exchange.rb
  43. +38 −36 lib/puppet/type/rabbitmq_parameter.rb
  44. +17 −14 lib/puppet/type/rabbitmq_plugin.rb
  45. +35 −70 lib/puppet/type/rabbitmq_policy.rb
  46. +18 −16 lib/puppet/type/rabbitmq_queue.rb
  47. +24 −28 lib/puppet/type/rabbitmq_user.rb
  48. +11 −9 lib/puppet/type/rabbitmq_user_permissions.rb
  49. +11 −9 lib/puppet/type/rabbitmq_vhost.rb
  50. +2 −2 manifests/config.pp
  51. +19 −4 manifests/init.pp
  52. +17 −2 manifests/install/rabbitmqadmin.pp
  53. +5 −7 metadata.json
  54. +19 −11 spec/acceptance/class_spec.rb
  55. +3 −1 spec/acceptance/clustering_spec.rb
  56. +2 −0 spec/acceptance/delete_guest_user_spec.rb
  57. +0 −10 spec/acceptance/nodesets/debian-8-x64.yml
  58. +3 −1 spec/acceptance/parameter_spec.rb
  59. +3 −1 spec/acceptance/policy_spec.rb
  60. +5 −3 spec/acceptance/queue_spec.rb
  61. +2 −0 spec/acceptance/rabbitmqadmin_spec.rb
  62. +3 −1 spec/acceptance/user_spec.rb
  63. +3 −1 spec/acceptance/vhost_spec.rb
  64. +76 −57 spec/classes/rabbitmq_spec.rb
  65. +7 −10 spec/spec_helper.rb
  66. +2 −0 spec/spec_helper_acceptance.rb
  67. +2 −0 spec/spec_helper_local.rb
  68. +4 −0 spec/unit/facter/util/fact_erl_ssl_path_spec.rb
  69. +17 −15 spec/unit/facter/util/fact_rabbitmq_clustername_spec.rb
  70. +17 −15 spec/unit/facter/util/fact_rabbitmq_nodename_spec.rb
  71. +2 −0 spec/unit/facter/util/fact_rabbitmq_plugins_dirs_spec.rb
  72. +4 −0 spec/unit/facter/util/fact_rabbitmq_version_spec.rb
  73. +28 −27 spec/unit/puppet/provider/rabbitmq_binding/rabbitmqadmin_spec.rb
  74. +2 −0 spec/unit/puppet/provider/rabbitmq_cli_spec.rb
  75. +2 −0 spec/unit/puppet/provider/rabbitmq_cluster/rabbitmqctl_spec.rb
  76. +16 −14 spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb
  77. +16 −14 spec/unit/puppet/provider/rabbitmq_parameter/rabbitmqctl_federation_spec.rb
  78. +53 −51 spec/unit/puppet/provider/rabbitmq_parameter/rabbitmqctl_spec.rb
  79. +8 −0 spec/unit/puppet/provider/rabbitmq_plugin/rabbitmqctl_spec.rb
  80. +17 −15 spec/unit/puppet/provider/rabbitmq_policy/rabbitmqctl_spec.rb
  81. +9 −7 spec/unit/puppet/provider/rabbitmq_queue/rabbitmqadmin_spec.rb
  82. +16 −11 spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb
  83. +35 −27 spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb
  84. +20 −14 spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb
  85. +8 −0 spec/unit/puppet/type/rabbitmq_binding_spec.rb
  86. +6 −0 spec/unit/puppet/type/rabbitmq_cluster_spec.rb
  87. +7 −0 spec/unit/puppet/type/rabbitmq_exchange_spec.rb
  88. +2 −0 spec/unit/puppet/type/rabbitmq_parameter_spec.rb
  89. +9 −0 spec/unit/puppet/type/rabbitmq_plugin_spec.rb
  90. +3 −1 spec/unit/puppet/type/rabbitmq_policy_spec.rb
  91. +5 −0 spec/unit/puppet/type/rabbitmq_queue_spec.rb
  92. +13 −6 spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb
  93. +9 −0 spec/unit/puppet/type/rabbitmq_user_spec.rb
  94. +4 −0 spec/unit/puppet/type/rabbitmq_vhost_spec.rb
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# editorconfig.org

# MANAGED BY MODULESYNC
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

root = true

Expand Down
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fixtures:
apt: 'https://github.com/puppetlabs/puppetlabs-apt'
archive: 'https://github.com/voxpupuli/puppet-archive'
erlang: 'https://github.com/garethr/garethr-erlang'
systemd: 'https://github.com/camptocamp/puppet-systemd'
systemd: 'https://github.com/voxpupuli/puppet-systemd'
yumrepo_core:
repo: 'https://github.com/puppetlabs/puppetlabs-yumrepo_core'
puppet_version: '>= 6.0.0'
41 changes: 5 additions & 36 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ By participating in this project you agree to abide by its terms.

* Fork the repo.
* Create a separate branch for your change.
* We only take pull requests with passing tests, and documentation. [travis-ci](http://travis-ci.org) runs the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
* We only take pull requests with passing tests, and documentation. [GitHub Actions](https://docs.github.com/en/actions) run the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
* Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request.
* Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
* Squash your commits down into logical components. Make sure to rebase against our current master.
Expand Down Expand Up @@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as:

```sh
export PUPPET_VERSION="~> 5.5.6"
export PUPPET_GEM_VERSION="~> 6.1.0"
```

You can install all needed gems for spec tests into the modules directory by
Expand Down Expand Up @@ -232,51 +232,20 @@ simple tests against it after applying the module. You can run this
with:

```sh
bundle exec rake beaker
```

This will run the tests on the module's default nodeset. You can override the
nodeset used, e.g.,

```sh
BEAKER_set=centos-7-x64 bundle exec rake beaker
```

There are default rake tasks for the various acceptance test modules, e.g.,

```sh
bundle exec rake beaker:centos-7-x64
bundle exec rake beaker:ssh:centos-7-x64
```

If you don't want to have to recreate the virtual machine every time you can
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the
created virtual machines will be in `.vagrant/beaker_vagrant_files`.

Beaker also supports docker containers. We also use that in our automated CI
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:

```sh
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
BEAKER_setfile=debian11-64 bundle exec rake beaker
```

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

* ubuntu1604
* ubuntu1804
* ubuntu2004
* debian9
* debian10
* debian11
* centos7
* centos8

The easiest way to debug in a docker container is to open a shell:

```sh
docker exec -it -u root ${container_id_or_name} bash
```
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).

The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
repository.
83 changes: 13 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,18 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: CI

on: pull_request

jobs:
setup_matrix:
name: 'Setup Test Matrix'
runs-on: ubuntu-latest
outputs:
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
env:
BUNDLE_WITHOUT: development:test:release
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Run rake validate
run: bundle exec rake validate
- name: Setup Test Matrix
id: get-outputs
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false

unit:
needs: setup_matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
env:
BUNDLE_WITHOUT: development:system_tests:release
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true

acceptance:
needs: setup_matrix
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: development:test:release
strategy:
fail-fast: false
matrix:
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
steps:
- name: Enable IPv6 on docker
run: |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
BEAKER_setfile: ${{ matrix.setfile.value }}
jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
with:
pidfile_workaround: 'false'
35 changes: 14 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: Release

on:
push:
tags:
- '*'

env:
BUNDLE_WITHOUT: development:test:system_tests

jobs:
deploy:
name: 'deploy to forge'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Build and Deploy
env:
# Configure secrets here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
run: bundle exec rake module:push
release:
name: Release
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
with:
allowed_owner: 'voxpupuli'
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 }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

pkg/
Gemfile.lock
Gemfile.local
Expand Down
5 changes: 4 additions & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
---
modulesync_config_version: '4.0.0'
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '5.2.0'
3 changes: 2 additions & 1 deletion .overcommit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Managed by https://github.com/voxpupuli/modulesync_configs
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
#
# Hooks are only enabled if you take action.
#
Expand Down
3 changes: 3 additions & 0 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

docs/
pkg/
Gemfile
Expand Down
3 changes: 3 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--fail-on-warnings
--no-parameter_documentation-check
--no-parameter_types-check
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format documentation
--color
3 changes: 3 additions & 0 deletions .rspec_parallel
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format progress
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_gem:
voxpupuli-test: rubocop.yml
2 changes: 0 additions & 2 deletions .yardopts

This file was deleted.

30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@ 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.

## [v12.0.0](https://github.com/voxpupuli/puppet-rabbitmq/tree/v12.0.0) (2022-03-28)

[Full Changelog](https://github.com/voxpupuli/puppet-rabbitmq/compare/v11.1.0...v12.0.0)

**Breaking changes:**

- breaking: remove support for debian 8 [\#888](https://github.com/voxpupuli/puppet-rabbitmq/pull/888) ([TheMeier](https://github.com/TheMeier))
- Drop Puppet 5 support; require 6.1.0 / Drop RedHat 6 support [\#878](https://github.com/voxpupuli/puppet-rabbitmq/pull/878) ([bastelfreak](https://github.com/bastelfreak))

**Fixed bugs:**

- change default python version for FreeBSD: 3.8 [\#904](https://github.com/voxpupuli/puppet-rabbitmq/pull/904) ([olevole](https://github.com/olevole))
- RedHat: Fix outdated gpgkey for packagecloud repo [\#901](https://github.com/voxpupuli/puppet-rabbitmq/pull/901) ([kajinamit](https://github.com/kajinamit))
- Fix Bug \#804 'rabbitmqadmin will not be upgraded' [\#897](https://github.com/voxpupuli/puppet-rabbitmq/pull/897) ([s-johansson](https://github.com/s-johansson))

**Closed issues:**

- Reference for log\_levels does not apply [\#894](https://github.com/voxpupuli/puppet-rabbitmq/issues/894)
- Adding rabbitmq-delayed-message-exchange plugin [\#890](https://github.com/voxpupuli/puppet-rabbitmq/issues/890)
- rabbitmqadmin will not be upgraded [\#804](https://github.com/voxpupuli/puppet-rabbitmq/issues/804)
- fix or eliminate remaining "multiple expectations" warnings [\#603](https://github.com/voxpupuli/puppet-rabbitmq/issues/603)

**Merged pull requests:**

- Adjust docu for RabbitMQ log level \#894 [\#896](https://github.com/voxpupuli/puppet-rabbitmq/pull/896) ([s-johansson](https://github.com/s-johansson))
- puppet-lint: fix top\_scope\_facts warnings [\#893](https://github.com/voxpupuli/puppet-rabbitmq/pull/893) ([bastelfreak](https://github.com/bastelfreak))
- Allow archive 6.0.0 [\#892](https://github.com/voxpupuli/puppet-rabbitmq/pull/892) ([smortex](https://github.com/smortex))
- Allow stdlib 8.0.0 [\#891](https://github.com/voxpupuli/puppet-rabbitmq/pull/891) ([smortex](https://github.com/smortex))
- switch from camptocamp/systemd to voxpupuli/systemd [\#889](https://github.com/voxpupuli/puppet-rabbitmq/pull/889) ([bastelfreak](https://github.com/bastelfreak))

## [v11.1.0](https://github.com/voxpupuli/puppet-rabbitmq/tree/v11.1.0) (2021-05-06)

[Full Changelog](https://github.com/voxpupuli/puppet-rabbitmq/compare/v11.0.0...v11.1.0)
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM ruby:2.5.3
# MANAGED BY MODULESYNC
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

FROM ruby:2.7

WORKDIR /opt/puppet

# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
RUN mkdir -p /etc/sv

ARG PUPPET_VERSION="~> 6.0"
ARG PUPPET_GEM_VERSION="~> 6.0"
ARG PARALLEL_TEST_PROCESSORS=4

# Cache gems
Expand Down
25 changes: 13 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 2.2', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'voxpupuli-test', '~> 5.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 1.0', :require => false
end

group :development do
Expand All @@ -12,22 +16,19 @@ group :development do
end

group :system_tests do
gem 'puppet_metadata', '~> 0.3.0', :require => false
gem 'voxpupuli-acceptance', :require => false
gem 'voxpupuli-acceptance', '~> 1.0', :require => false
end

group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
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
end

gem 'puppetlabs_spec_helper', '~> 2.0', :require => false
gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

puppetversion = ENV['PUPPET_VERSION'] || '~> 6.0'
puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
Loading