Showing with 327 additions and 434 deletions.
  1. +14 −0 .editorconfig
  2. +15 −0 .github/CONTRIBUTING.md
  3. +1 −1 .msync.yml
  4. +1 −0 .pmtignore
  5. +1 −0 .sync.yml
  6. +31 −40 .travis.yml
  7. +28 −2 CHANGELOG.md
  8. +21 −0 Dockerfile
  9. +4 −3 Gemfile
  10. +1 −1 HISTORY.md
  11. +4 −10 lib/puppet/provider/rabbitmq_binding/rabbitmqadmin.rb
  12. +87 −0 lib/puppet/provider/rabbitmq_cli.rb
  13. +4 −15 lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb
  14. +3 −3 lib/puppet/provider/rabbitmq_parameter/rabbitmqctl.rb
  15. +3 −14 lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb
  16. +3 −3 lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb
  17. +5 −14 lib/puppet/provider/rabbitmq_queue/rabbitmqadmin.rb
  18. +3 −7 lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb
  19. +3 −11 lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb
  20. +5 −11 lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb
  21. +0 −32 lib/puppet/provider/rabbitmqctl.rb
  22. +2 −2 lib/puppet/type/rabbitmq_binding.rb
  23. +3 −2 metadata.json
  24. +0 −15 spec/acceptance/nodesets/centos-511-x64.yml
  25. +0 −15 spec/acceptance/nodesets/centos-6-x64.yml
  26. +0 −17 spec/acceptance/nodesets/centos-66-x64-pe.yml
  27. +0 −15 spec/acceptance/nodesets/centos-7-x64.yml
  28. +0 −15 spec/acceptance/nodesets/debian-78-x64.yml
  29. +0 −15 spec/acceptance/nodesets/debian-82-x64.yml
  30. +0 −15 spec/acceptance/nodesets/fedora-24-x64.yml
  31. +0 −16 spec/acceptance/nodesets/fedora-25-x64.yml
  32. +0 −16 spec/acceptance/nodesets/fedora-26-x64.yml
  33. +0 −18 spec/acceptance/nodesets/fedora-27-x64.yml
  34. +0 −15 spec/acceptance/nodesets/ubuntu-server-1204-x64.yml
  35. +0 −15 spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
  36. +0 −15 spec/acceptance/nodesets/ubuntu-server-1604-x64.yml
  37. +0 −4 spec/classes/coverage_spec.rb
  38. +0 −13 spec/default_facts.yml
  39. +9 −5 spec/spec_helper.rb
  40. +1 −1 spec/spec_helper_acceptance.rb
  41. +12 −12 spec/unit/puppet/provider/rabbitmq_binding/rabbitmqadmin_spec.rb
  42. +37 −0 spec/unit/puppet/provider/rabbitmq_cli_spec.rb
  43. +2 −2 spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb
  44. +3 −3 spec/unit/puppet/provider/rabbitmq_parameter/rabbitmqctl_spec.rb
  45. +7 −7 spec/unit/puppet/provider/rabbitmq_policy/rabbitmqctl_spec.rb
  46. +2 −2 spec/unit/puppet/provider/rabbitmq_queue/rabbitmqadmin_spec.rb
  47. +1 −1 spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb
  48. +8 −8 spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb
  49. +3 −3 spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org

# MANAGED BY 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
15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,21 @@ To run a specific spec test set the `SPEC` variable:
bundle exec rake spec SPEC=spec/foo_spec.rb
```

### Unit tests in docker

Some people don't want to run the dependencies locally or don't want to install
ruby. We ship a Dockerfile that enables you to run all unit tests and linting.
You only need to run:

```sh
docker build .
```

Please ensure that a docker daemon is running and that your user has the
permission to talk to it. You can specify a remote docker host by setting the
`DOCKER_HOST` environment variable. it will copy the content of the module into
the docker image. So it will not work if a Gemfile.lock exists.

## Integration tests

The unit tests just check the code runs, not that it does exactly what
Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '2.2.0'
modulesync_config_version: '2.4.0'
1 change: 1 addition & 0 deletions .pmtignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Dockerfile
1 change: 1 addition & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- set: debian9-64
- set: ubuntu1404-64
- set: ubuntu1604-64
- set: ubuntu1804-64
- set: centos6-64
- set: centos7-64
appveyor.yml:
Expand Down
71 changes: 31 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sudo: false
dist: trusty
dist: xenial
language: ruby
cache: bundler
before_install:
Expand All @@ -10,9 +10,6 @@ script:
matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=12
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test
Expand All @@ -27,112 +24,106 @@ matrix:
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1404-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos6-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos6-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos6-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
allow_failures:
- env: BEAKER_PUPPET_COLLECTION=puppet6-nightly
branches:
only:
- master
Expand Down
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@ 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.

## [v8.5.0](https://github.com/voxpupuli/puppet-rabbitmq/tree/v8.5.0) (2019-01-20)

[Full Changelog](https://github.com/voxpupuli/puppet-rabbitmq/compare/v8.4.1...v8.5.0)

**Implemented enhancements:**

- Officially support Ubuntu 18.04 [\#758](https://github.com/voxpupuli/puppet-rabbitmq/pull/758) ([baurmatt](https://github.com/baurmatt))

**Fixed bugs:**

- rabbitmqctl -q status fails [\#763](https://github.com/voxpupuli/puppet-rabbitmq/issues/763)
- Wrong rabbitmq-plugins command is used installing plugins [\#748](https://github.com/voxpupuli/puppet-rabbitmq/issues/748)
- Error 765 after latest update [\#741](https://github.com/voxpupuli/puppet-rabbitmq/issues/741)
- rabbitmqctl 'broken' in 3.7.9 [\#740](https://github.com/voxpupuli/puppet-rabbitmq/issues/740)
- Override the PATH for providers to include /usr/lib/rabbitmq/bin [\#766](https://github.com/voxpupuli/puppet-rabbitmq/pull/766) ([JayH5](https://github.com/JayH5))
- RabbitMQ 3.7.9+ list compatibility and provider cleanup [\#759](https://github.com/voxpupuli/puppet-rabbitmq/pull/759) ([JayH5](https://github.com/JayH5))

**Closed issues:**

- Officially support Ubuntu 18.04 [\#757](https://github.com/voxpupuli/puppet-rabbitmq/issues/757)

**Merged pull requests:**

- Make Ubuntu 18.04 persistent for modulesync [\#767](https://github.com/voxpupuli/puppet-rabbitmq/pull/767) ([baurmatt](https://github.com/baurmatt))
- Remove trailing whitespace in HISTORY [\#762](https://github.com/voxpupuli/puppet-rabbitmq/pull/762) ([wyardley](https://github.com/wyardley))

## [v8.4.1](https://github.com/voxpupuli/puppet-rabbitmq/tree/v8.4.1) (2018-12-08)

[Full Changelog](https://github.com/voxpupuli/puppet-rabbitmq/compare/v8.4.0...v8.4.1)
Expand Down Expand Up @@ -285,7 +311,7 @@ These should not affect the functionality of the module.
- \[Bugfix\] convert $ssl\_depth from string to integer [\#539](https://github.com/voxpupuli/puppet-rabbitmq/pull/539) ([bastelfreak](https://github.com/bastelfreak))
- Extend rabbitmqadmin config template with SSL options. [\#526](https://github.com/voxpupuli/puppet-rabbitmq/pull/526) ([justahero](https://github.com/justahero))
- \[MODULES-4223\] don't set NODE\_PORT and NODE\_IP\_ADDRESS if ssl\_only [\#524](https://github.com/voxpupuli/puppet-rabbitmq/pull/524) ([JAORMX](https://github.com/JAORMX))
- \[MODULES-3733\] rabbitmq provider env\_path does not locate ruby gem installed puppet binary [\#517](https://github.com/voxpupuli/puppet-rabbitmq/pull/517) ([nzverev](https://github.com/nzverev))
- \[MODULES-3733\] rabbitmq provider env\_path does not locate ruby gem installed puppet binary [\#517](https://github.com/voxpupuli/puppet-rabbitmq/pull/517) ([lowstorage](https://github.com/lowstorage))

**Closed issues:**

Expand Down Expand Up @@ -629,7 +655,7 @@ the README for more information on how to configure this.
- exchanges no longer recreated on each puppet run if non-default vhost is used
- Allow port to be UNSET
- Re-added rabbitmq::server class
- Deprecated previously unused manage\_service variable in favor of
- Deprecated previously unused manage\_service variable in favor of
service\_manage
- Use correct key for rabbitmq apt::source
- config\_mirrored\_queues variable removed
Expand Down
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ruby:2.5.1

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 PARALLEL_TEST_PROCESSORS=4

# Cache gems
COPY Gemfile .
RUN bundle install --without system_tests development release --path=${BUNDLE_PATH:-vendor/bundle}

COPY . .

RUN bundle install
RUN bundle exec release_checks

# Container should not saved
RUN exit 1
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ group :test do
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2'
gem 'parallel_tests', :require => false
gem 'parallel_tests', '2.24.0', :require => false if RUBY_VERSION < '2.2.0'
gem 'parallel_tests', :require => false if RUBY_VERSION >= '2.2.0'
end

group :development do
Expand All @@ -43,15 +44,15 @@ group :system_tests do
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
else
gem 'beaker', '>= 3.9.0', :require => false
gem 'beaker', '>= 4.2.0', :require => false
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-hostgenerator', '>= 1.1.10', :require => false
gem 'beaker-hostgenerator', '>= 1.1.22', :require => false
gem 'beaker-docker', :require => false
gem 'beaker-puppet', :require => false
gem 'beaker-puppet_install_helper', :require => false
Expand Down
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ the README for more information on how to configure this.
- exchanges no longer recreated on each puppet run if non-default vhost is used
- Allow port to be UNSET
- Re-added rabbitmq::server class
- Deprecated previously unused manage\_service variable in favor of
- Deprecated previously unused manage\_service variable in favor of
service\_manage
- Use correct key for rabbitmq apt::source
- config\_mirrored\_queues variable removed
Expand Down
14 changes: 4 additions & 10 deletions lib/puppet/provider/rabbitmq_binding/rabbitmqadmin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
require 'puppet'
require 'digest'

Puppet::Type.type(:rabbitmq_binding).provide(:rabbitmqadmin) do
has_command(:rabbitmqctl, 'rabbitmqctl') do
environment HOME: '/tmp'
end
has_command(:rabbitmqadmin, '/usr/local/bin/rabbitmqadmin') do
environment HOME: '/tmp'
end

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'rabbitmq_cli'))
Puppet::Type.type(:rabbitmq_binding).provide(:rabbitmqadmin, parent: Puppet::Provider::RabbitmqCli) do
confine feature: :posix

# Without this, the composite namevar stuff doesn't work properly.
Expand All @@ -25,14 +19,14 @@ def should_vhost

def self.all_vhosts
vhosts = []
rabbitmqctl('list_vhosts', '-q').split(%r{\n}).map do |vhost|
rabbitmqctl_list('vhosts').split(%r{\n}).map do |vhost|
vhosts.push(vhost)
end
vhosts
end

def self.all_bindings(vhost)
rabbitmqctl('list_bindings', '-q', '-p', vhost, 'source_name', 'destination_name', 'destination_kind', 'routing_key', 'arguments').split(%r{\n})
rabbitmqctl_list('bindings', '-p', vhost, 'source_name', 'destination_name', 'destination_kind', 'routing_key', 'arguments').split(%r{\n})
end

def self.instances
Expand Down
Loading