Skip to content

Commit

Permalink
Merge pull request #163 from cognifloyd/rmq_plugins
Browse files Browse the repository at this point in the history
FEATURE: Allow for installing rabbitmq_plugins
  • Loading branch information
armab authored Sep 11, 2017
2 parents 66193f3 + efe4b3a commit afbf6f4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions roles/rabbitmq/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
rabbitmq_plugins: []
# To enable the management plugin (in which case you'd want at least one user tagged with administrator):
#rabbitmq_plugins:
# - rabbitmq_management
12 changes: 12 additions & 0 deletions roles/rabbitmq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,15 @@
enabled: yes
state: started
tags: rabbitmq

- name: Add RabbitMQ plugins
become: yes
rabbitmq_plugin:
names: "{{ rabbitmq_plugins|join(',') }}"
state: enabled
# new_only: no = Remove all plguins that aren't listed in rabbitmq_plugins
new_only: no
# the EL6 RPM for rabbitmq-server does not place the rabbitmq-plugins binary in the search path (other distro's packages do, including EL7). Prefix adds it to the binary search path.
prefix: "{{ rabbitmq_on_el6 | ternary(rabbitmq_el6_prefix, omit) }}"
when: rabbitmq_plugins
tags: rabbitmq
3 changes: 3 additions & 0 deletions roles/rabbitmq/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rabbitmq_el6_prefix: "/usr/lib/rabbitmq/"
rabbitmq_on_el6: "{{ (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '6') }}"

0 comments on commit afbf6f4

Please sign in to comment.