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: "^$"
|
configure_priv: "^$"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- name: Create the RabbitMQ exchanges
|
- rabbitmq_cluster
|
||||||
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
|
|
||||||
- name: Create the RabbitMQ queue amqp_to_zmq
|
- name: Create the RabbitMQ queue amqp_to_zmq
|
||||||
rabbitmq_queue:
|
rabbitmq_queue:
|
||||||
name: amqp_to_zmq
|
name: amqp_to_zmq
|
||||||
|
@ -40,6 +30,8 @@
|
||||||
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:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the RabbitMQ queue for verify-missing
|
- name: Create the RabbitMQ queue for verify-missing
|
||||||
rabbitmq_queue:
|
rabbitmq_queue:
|
||||||
name: amqp_bridge_verify_missing
|
name: amqp_bridge_verify_missing
|
||||||
|
@ -51,53 +43,34 @@
|
||||||
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:
|
tags:
|
||||||
- config
|
- config
|
||||||
# Do this manually until an Ansible bugfix is deployed
|
- rabbitmq_cluster
|
||||||
# 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
|
|
||||||
- name: Create the amqp-to-zmq bindings
|
- 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:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
- rabbitmq_cluster
|
||||||
|
|
||||||
- name: Create the verify-missing bindings
|
- 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:
|
with_items:
|
||||||
- amq.topic
|
- amq.topic
|
||||||
- zmq.topic
|
- zmq.topic
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
#
|
- rabbitmq_cluster
|
||||||
# == 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
|
|
||||||
|
|
||||||
|
|
||||||
# Now create the app
|
# Now create the app
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue