Add the rabbitmq_cluster tag to the rabbit roles
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
82fec0f69c
commit
9370ffcf7e
2 changed files with 28 additions and 9 deletions
|
@ -26,7 +26,9 @@
|
||||||
that:
|
that:
|
||||||
- "queue_name.startswith(username)"
|
- "queue_name.startswith(username)"
|
||||||
fail_msg: "Your queue name must be prefixed with your username"
|
fail_msg: "Your queue name must be prefixed with your username"
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Validate the user parameter
|
- name: Validate the user parameter
|
||||||
assert:
|
assert:
|
||||||
|
@ -35,7 +37,9 @@
|
||||||
- username != "guest"
|
- username != "guest"
|
||||||
- username != "nagios-monitoring"
|
- username != "nagios-monitoring"
|
||||||
fail_msg: "This user name is reserved"
|
fail_msg: "This user name is reserved"
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
# See https://www.rabbitmq.com/access-control.html#permissions for details on
|
# See https://www.rabbitmq.com/access-control.html#permissions for details on
|
||||||
# the RabbitMQ permissions configuration.
|
# the RabbitMQ permissions configuration.
|
||||||
|
@ -51,7 +55,9 @@
|
||||||
write_priv: "^(amq\\.topic)|({{ username }}.*){% for queue in write_queues|default([]) %}|({{ queue }}.*){% endfor %}$"
|
write_priv: "^(amq\\.topic)|({{ username }}.*){% for queue in write_queues|default([]) %}|({{ queue }}.*){% endfor %}$"
|
||||||
configure_priv: "^$" # No configuration permissions
|
configure_priv: "^$" # No configuration permissions
|
||||||
state: present
|
state: present
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the {{ queue_name }} queue in RabbitMQ
|
- name: Create the {{ queue_name }} queue in RabbitMQ
|
||||||
delegate_to: "{{ rabbitmq_server }}"
|
delegate_to: "{{ rabbitmq_server }}"
|
||||||
|
@ -64,7 +70,9 @@
|
||||||
state: present
|
state: present
|
||||||
login_user: admin
|
login_user: admin
|
||||||
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Bind the {{ queue_name }} queue to the amq.topic exchange
|
- name: Bind the {{ queue_name }} queue to the amq.topic exchange
|
||||||
delegate_to: "{{ rabbitmq_server }}"
|
delegate_to: "{{ rabbitmq_server }}"
|
||||||
|
@ -78,7 +86,9 @@
|
||||||
login_user: admin
|
login_user: admin
|
||||||
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||||
loop: "{{ routing_keys }}"
|
loop: "{{ routing_keys }}"
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
# This can be removed when we're done with fedmsg and the bridges are retired.
|
# This can be removed when we're done with fedmsg and the bridges are retired.
|
||||||
- name: Bind the {{ queue_name }} queue to the zmq.topic exchange
|
- name: Bind the {{ queue_name }} queue to the zmq.topic exchange
|
||||||
|
@ -93,7 +103,9 @@
|
||||||
login_user: admin
|
login_user: admin
|
||||||
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||||
loop: "{{ routing_keys }}"
|
loop: "{{ routing_keys }}"
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Monitor the {{ queue_name }} queue in Nagios (NRPE)
|
- name: Monitor the {{ queue_name }} queue in Nagios (NRPE)
|
||||||
when: thresholds and env == "production"
|
when: thresholds and env == "production"
|
||||||
|
@ -105,7 +117,9 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart nrpe on rabbitmq
|
notify: restart nrpe on rabbitmq
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Monitor the {{ queue_name }} queue in Nagios
|
- name: Monitor the {{ queue_name }} queue in Nagios
|
||||||
when: thresholds and env == "production"
|
when: thresholds and env == "production"
|
||||||
|
@ -114,4 +128,6 @@
|
||||||
src: nagios.cfg.j2
|
src: nagios.cfg.j2
|
||||||
dest: /etc/nagios/services/rabbitmq-queue-{{ queue_name }}.cfg
|
dest: /etc/nagios/services/rabbitmq-queue-{{ queue_name }}.cfg
|
||||||
notify: restart nagios on noc
|
notify: restart nagios on noc
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
- username != "guest"
|
- username != "guest"
|
||||||
- username != "nagios-monitoring"
|
- username != "nagios-monitoring"
|
||||||
fail_msg: "This user name is reserved"
|
fail_msg: "This user name is reserved"
|
||||||
tags: fedora-messaging
|
tags:
|
||||||
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the user in RabbitMQ
|
- name: Create the user in RabbitMQ
|
||||||
delegate_to: "{{ rabbitmq_server }}"
|
delegate_to: "{{ rabbitmq_server }}"
|
||||||
|
@ -33,3 +35,4 @@
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- fedora-messaging
|
- fedora-messaging
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue