Showing with 5,581 additions and 4,252 deletions.
  1. +2 −2 .fixtures.yml
  2. +3 −3 .gitattributes
  3. +104 −0 .github/CONTRIBUTING.md
  4. +26 −0 .github/ISSUE_TEMPLATE.md
  5. +8 −0 .github/PULL_REQUEST_TEMPLATE.md
  6. +9 −1 .gitignore
  7. +1 −0 .msync.yml
  8. +63 −0 .overcommit.yml
  9. +20 −0 .pmtignore
  10. +23 −0 .project
  11. +1 −1 .rspec
  12. +1 −0 .rspec_parallel
  13. +66 −42 .rubocop.yml
  14. +11 −0 .sync.yml
  15. +41 −23 .travis.yml
  16. +2 −0 .yardopts
  17. +236 −74 CHANGELOG.md
  18. +0 −218 CONTRIBUTING.md
  19. +61 −38 Gemfile
  20. +347 −0 HISTORY.md
  21. +6 −0 MAINTAINERS.md
  22. +3 −6 NOTICE
  23. +82 −445 README.md
  24. +34 −27 Rakefile
  25. +2 −2 {tests → examples}/erlang_deps.pp
  26. +11 −7 {tests → examples}/full.pp
  27. 0 {tests → examples}/permissions/add.pp
  28. +1 −1 {tests → examples}/plugin.pp
  29. +2 −0 examples/repo/apt.pp
  30. +1 −1 {tests → examples}/server.pp
  31. +1 −0 examples/service.pp
  32. +1 −1 {tests → examples}/site.pp
  33. 0 {tests → examples}/user/add.pp
  34. 0 {tests → examples}/vhosts/add.pp
  35. +13 −0 lib/facter/erl_ssl_path.rb
  36. +2 −2 lib/facter/rabbitmq_nodename.rb
  37. +1 −1 lib/facter/rabbitmq_version.rb
  38. +48 −49 lib/puppet/provider/rabbitmq_binding/rabbitmqadmin.rb
  39. +10 −22 lib/puppet/provider/rabbitmq_erlang_cookie/ruby.rb
  40. +37 −53 lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb
  41. +24 −27 lib/puppet/provider/rabbitmq_parameter/rabbitmqctl.rb
  42. +17 −31 lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb
  43. +49 −44 lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb
  44. +29 −40 lib/puppet/provider/rabbitmq_queue/rabbitmqadmin.rb
  45. +40 −52 lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb
  46. +31 −31 lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb
  47. +12 −19 lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb
  48. +5 −6 lib/puppet/provider/rabbitmqctl.rb
  49. +117 −28 lib/puppet/type/rabbitmq_binding.rb
  50. +16 −6 lib/puppet/type/rabbitmq_erlang_cookie.rb
  51. +26 −11 lib/puppet/type/rabbitmq_exchange.rb
  52. +30 −17 lib/puppet/type/rabbitmq_parameter.rb
  53. +17 −11 lib/puppet/type/rabbitmq_plugin.rb
  54. +43 −17 lib/puppet/type/rabbitmq_policy.rb
  55. +24 −11 lib/puppet/type/rabbitmq_queue.rb
  56. +37 −23 lib/puppet/type/rabbitmq_user.rb
  57. +15 −9 lib/puppet/type/rabbitmq_user_permissions.rb
  58. +14 −5 lib/puppet/type/rabbitmq_vhost.rb
  59. +25 −0 locales/config.yaml
  60. +168 −76 manifests/config.pp
  61. +313 −229 manifests/init.pp
  62. +6 −16 manifests/install.pp
  63. +27 −15 manifests/install/rabbitmqadmin.pp
  64. +43 −44 manifests/params.pp
  65. +8 −11 manifests/repo/apt.pp
  66. +18 −10 manifests/repo/rhel.pp
  67. +3 −12 manifests/server.pp
  68. +3 −6 manifests/service.pp
  69. +26 −13 metadata.json
  70. +162 −43 spec/acceptance/class_spec.rb
  71. +16 −17 spec/acceptance/clustering_spec.rb
  72. +7 −7 spec/acceptance/delete_guest_user_spec.rb
  73. +13 −0 spec/acceptance/nodesets/archlinux-2-x64.yml
  74. +15 −0 spec/acceptance/nodesets/centos-511-x64.yml
  75. +15 −0 spec/acceptance/nodesets/centos-6-x64.yml
  76. +17 −0 spec/acceptance/nodesets/centos-66-x64-pe.yml
  77. +9 −4 spec/acceptance/nodesets/centos-7-x64.yml
  78. +15 −0 spec/acceptance/nodesets/debian-78-x64.yml
  79. +15 −0 spec/acceptance/nodesets/debian-82-x64.yml
  80. +19 −0 spec/acceptance/nodesets/docker/centos-5.yml
  81. +20 −0 spec/acceptance/nodesets/docker/centos-6.yml
  82. +9 −2 spec/acceptance/nodesets/docker/centos-7.yml
  83. +19 −0 spec/acceptance/nodesets/docker/debian-7.yml
  84. +11 −1 spec/acceptance/nodesets/docker/debian-8.yml
  85. +19 −0 spec/acceptance/nodesets/docker/ubuntu-12.04.yml
  86. +11 −2 spec/acceptance/nodesets/docker/ubuntu-14.04.yml
  87. +19 −0 spec/acceptance/nodesets/docker/ubuntu-16.04.yml
  88. +31 −0 spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml
  89. +34 −0 spec/acceptance/nodesets/ec2/image_templates.yaml
  90. +29 −0 spec/acceptance/nodesets/ec2/rhel-73-x64.yml
  91. +29 −0 spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml
  92. +29 −0 spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml
  93. +29 −0 spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml
  94. +15 −0 spec/acceptance/nodesets/fedora-24-x64.yml
  95. +18 −0 spec/acceptance/nodesets/fedora-25-x64.yml
  96. +15 −0 spec/acceptance/nodesets/ubuntu-server-1204-x64.yml
  97. +15 −0 spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
  98. +15 −0 spec/acceptance/nodesets/ubuntu-server-1604-x64.yml
  99. +10 −10 spec/acceptance/parameter_spec.rb
  100. +24 −11 spec/acceptance/policy_spec.rb
  101. +115 −32 spec/acceptance/queue_spec.rb
  102. +14 −15 spec/acceptance/rabbitmqadmin_spec.rb
  103. +23 −24 spec/acceptance/server_spec.rb
  104. +10 −11 spec/acceptance/user_spec.rb
  105. +10 −11 spec/acceptance/vhost_spec.rb
  106. +0 −197 spec/acceptance/zz281_spec.rb
  107. +4 −0 spec/classes/coverage_spec.rb
  108. +943 −1,048 spec/classes/rabbitmq_spec.rb
  109. +14 −0 spec/default_facts.yml
  110. +0 −6 spec/spec.opts
  111. +30 −5 spec/spec_helper.rb
  112. +96 −19 spec/spec_helper_acceptance.rb
  113. +6 −41 spec/spec_helper_local.rb
  114. +42 −0 spec/unit/facter/util/fact_erl_ssl_path_spec.rb
  115. +91 −0 spec/unit/facter/util/fact_rabbitmq_nodename_spec.rb
  116. +31 −0 spec/unit/facter/util/fact_rabbitmq_version_spec.rb
  117. +143 −39 spec/unit/puppet/provider/rabbitmq_binding/rabbitmqadmin_spec.rb
  118. +36 −41 spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb
  119. +48 −51 spec/unit/puppet/provider/rabbitmq_parameter/rabbitmqctl_spec.rb
  120. +16 −18 spec/unit/puppet/provider/rabbitmq_plugin/rabbitmqctl_spec.rb
  121. +60 −61 spec/unit/puppet/provider/rabbitmq_policy/rabbitmqctl_spec.rb
  122. +29 −34 spec/unit/puppet/provider/rabbitmq_queue/rabbitmqadmin_spec.rb
  123. +115 −108 spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb
  124. +53 −57 spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb
  125. +22 −24 spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb
  126. +40 −43 spec/unit/puppet/type/rabbitmq_binding_spec.rb
  127. +40 −40 spec/unit/puppet/type/rabbitmq_exchange_spec.rb
  128. +52 −54 spec/unit/puppet/type/rabbitmq_parameter_spec.rb
  129. +16 −16 spec/unit/puppet/type/rabbitmq_plugin_spec.rb
  130. +144 −117 spec/unit/puppet/type/rabbitmq_policy_spec.rb
  131. +36 −38 spec/unit/puppet/type/rabbitmq_queue_spec.rb
  132. +35 −33 spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb
  133. +34 −36 spec/unit/puppet/type/rabbitmq_user_spec.rb
  134. +14 −14 spec/unit/puppet/type/rabbitmq_vhost_spec.rb
  135. +0 −39 spec/unit/rabbitmq_nodename_spec.rb
  136. +0 −19 spec/unit/rabbitmq_version_spec.rb
  137. +5 −0 templates/inetrc.erb
  138. +5 −5 templates/rabbitmq-env.conf.erb
  139. +33 −17 templates/rabbitmq.config.erb
  140. +6 −0 templates/rabbitmqadmin.conf.erb
  141. +0 −2 tests/repo/apt.pp
  142. +0 −1 tests/service.pp
4 changes: 2 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fixtures:
repositories:
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
"apt": "git://github.com/puppetlabs/puppetlabs-apt.git"
"staging": "git://github.com/voxpupuli/puppet-staging.git"
"erlang:": "git://github.com/garethr/garethr-erlang.git"
"archive": "https://github.com/voxpupuli/puppet-archive.git"
"erlang": "git://github.com/garethr/garethr-erlang.git"
symlinks:
"rabbitmq": "#{source_dir}"
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#This file is generated by ModuleSync, do not edit.
*.rb eol=lf
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
*.pp eol=lf
*.sh eol=lf
104 changes: 104 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
This module has grown over time based on a range of contributions from
people using it. If you follow these contributing guidelines your patch
will likely make it into a release a little quicker.

## Contributing

Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.
[Contributor Code of Conduct](https://voxpupuli.org/coc/).

1. Fork the repo.

1. Create a separate branch for your change.

1. Run the tests. We only take pull requests with passing tests, and
documentation.

1. 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.

1. Squash your commits down into logical components. Make sure to rebase
against the current master.

1. Push the branch to your fork and submit a pull request.

Please be prepared to repeat some of these steps as our contributors review
your code.

## Dependencies

The testing and development tools have a bunch of dependencies,
all managed by [bundler](http://bundler.io/) according to the
[Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions).

By default the tests use a baseline version of Puppet.

If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as:

export PUPPET_VERSION="~> 4.2.0"

Install the dependencies like so...

bundle install

## Syntax and style

The test suite will run [Puppet Lint](http://puppet-lint.com/) and
[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to
check various syntax and style things. You can run these locally with:

bundle exec rake lint
bundle exec rake validate

It will also run some [Rubocop](http://batsov.com/rubocop/) tests
against it. You can run those locally ahead of time with:

bundle exec rake rubocop

## Running the unit tests

The unit test suite covers most of the code, as mentioned above please
add tests if you're adding new functionality. If you've not used
[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask
about how best to test your new feature.

To run your all the unit tests

bundle exec rake spec SPEC_OPTS='--format documentation'

To run a specific spec test set the `SPEC` variable:

bundle exec rake spec SPEC=spec/foo_spec.rb

To run the linter, the syntax checker and the unit tests:

bundle exec rake test

## Integration tests

The unit tests just check the code runs, not that it does exactly what
we want on a real machine. For that we're using
[beaker](https://github.com/puppetlabs/beaker).

This fires up a new virtual machine (using vagrant) and runs a series of
simple tests against it after applying the module. You can run this
with:

bundle exec rake acceptance

This will run the tests on an Ubuntu 12.04 virtual machine. You can also
run the integration tests against Centos 6.6 with.

BEAKER_set=centos-66-x64 bundle exec rake acceptances

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_fies`.

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

docker exec -it -u root ${container_id_or_name} bash
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
Thank you for contributing to this project!
- This project has a Contributor Code of Conduct: https://voxpupuli.org/coc/
- Please check that here is no existing issue or PR that addresses your problem.
- Please fill the following form to enable us to help you.
- Our vulnerabilities reporting process is at https://voxpupuli.org/security/
-->

## 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
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--
Thank you for contributing to this project!
- This project has a Contributor Code of Conduct: https://voxpupuli.org/coc/
- Please check that here is no existing issue or PR that addresses your problem.
- Our vulnerabilities reporting process is at https://voxpupuli.org/security/
-->
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
#This file is generated by ModuleSync, do not edit.
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
1 change: 1 addition & 0 deletions .msync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
modulesync_config_version: '1.0.0'
63 changes: 63 additions & 0 deletions .overcommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Managed by https://github.com/voxpupuli/modulesync_configs
#
# 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']
PuppetLint:
enabled: true
description: 'Runs puppet-lint on modified files only'
command: ['bundle', 'exec', 'puppet-lint']
YamlSyntax:
enabled: true
JsonSyntax:
enabled: true
TrailingWhitespace:
enabled: true

PrePush:
RakeTarget:
enabled: true
description: 'Run rake targets'
targets:
- 'test'
- 'rubocop'
command: [ 'bundle', 'exec', 'rake' ]
20 changes: 20 additions & 0 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
docs/
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/
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>puppetlabs-rabbitmq</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--color
--format documentation
--color
1 change: 1 addition & 0 deletions .rspec_parallel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--format progress
Loading