RabbitMQ: use the proper tags for the messaging-bridges playbook
This commit is contained in:
parent
9370ffcf7e
commit
2df32fbe0c
1 changed files with 23 additions and 50 deletions
|
@ -20,18 +20,8 @@
|
|||
configure_priv: "^$"
|
||||
tags:
|
||||
- config
|
||||
- name: Create the RabbitMQ exchanges
|
||||
rabbitmq_exchange:
|
||||
name: "{{item}}"
|
||||
exchange_type: topic
|
||||
vhost: /pubsub
|
||||
login_user: admin
|
||||
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||
with_items:
|
||||
- amq.topic
|
||||
- zmq.topic
|
||||
tags:
|
||||
- config
|
||||
- rabbitmq_cluster
|
||||
|
||||
- name: Create the RabbitMQ queue amqp_to_zmq
|
||||
rabbitmq_queue:
|
||||
name: amqp_to_zmq
|
||||
|
@ -40,6 +30,8 @@
|
|||
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||
tags:
|
||||
- config
|
||||
- rabbitmq_cluster
|
||||
|
||||
- name: Create the RabbitMQ queue for verify-missing
|
||||
rabbitmq_queue:
|
||||
name: amqp_bridge_verify_missing
|
||||
|
@ -51,53 +43,34 @@
|
|||
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||
tags:
|
||||
- config
|
||||
# Do this manually until an Ansible bugfix is deployed
|
||||
# https://github.com/ansible/ansible/pull/45109
|
||||
#
|
||||
# == Dirty manual way while bug 45109 isn't fixed
|
||||
- name: Get the rabbitmqadmin command
|
||||
get_url:
|
||||
url: http://localhost:15672/cli/rabbitmqadmin
|
||||
dest: /usr/local/bin/rabbitmqadmin
|
||||
mode: 0755
|
||||
tags:
|
||||
- config
|
||||
- rabbitmq_cluster
|
||||
|
||||
- name: Create the amqp-to-zmq bindings
|
||||
command: /usr/local/bin/rabbitmqadmin -V /pubsub -u admin -p {{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }} declare binding source=amq.topic destination=amqp_to_zmq destination_type=queue
|
||||
rabbitmq_binding:
|
||||
name: amq.topic
|
||||
destination: amqp_to_zmq
|
||||
destination_type: queue
|
||||
vhost: /pubsub
|
||||
login_user: admin
|
||||
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||
tags:
|
||||
- config
|
||||
- rabbitmq_cluster
|
||||
|
||||
- name: Create the verify-missing bindings
|
||||
command: /usr/local/bin/rabbitmqadmin -V /pubsub -u admin -p {{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }} declare binding source={{ item }} destination=amqp_bridge_verify_missing destination_type=queue
|
||||
rabbitmq_binding:
|
||||
name: "{{item}}"
|
||||
destination: amqp_bridge_verify_missing
|
||||
destination_type: queue
|
||||
vhost: /pubsub
|
||||
login_user: admin
|
||||
login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||
with_items:
|
||||
- amq.topic
|
||||
- zmq.topic
|
||||
tags:
|
||||
- config
|
||||
#
|
||||
# == Proper ansible way of doing it
|
||||
#- name: Create the amqp-to-zmq bindings
|
||||
# rabbitmq_binding:
|
||||
# source: amq.topic
|
||||
# destination: amqp_to_zmq
|
||||
# destination_type: queue
|
||||
# vhost: /pubsub
|
||||
# login_user: admin
|
||||
# login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||
# tags:
|
||||
# - config
|
||||
#- name: Create the verify-missing bindings
|
||||
# rabbitmq_binding:
|
||||
# source: "{{item}}"
|
||||
# destination: amqp_bridge_verify_missing
|
||||
# destination_type: queue
|
||||
# vhost: /pubsub
|
||||
# login_user: admin
|
||||
# login_password: "{{ (env == 'production')|ternary(rabbitmq_admin_password_production, rabbitmq_admin_password_staging) }}"
|
||||
# with_items:
|
||||
# - amq.topic
|
||||
# - zmq.topic
|
||||
# tags:
|
||||
# - config
|
||||
- rabbitmq_cluster
|
||||
|
||||
|
||||
# Now create the app
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue