Create the RabbitMQ user, queues and bindings
This commit is contained in:
parent
6782635a14
commit
618eae997e
3 changed files with 59 additions and 3 deletions
|
@ -1,3 +1,59 @@
|
|||
# Create the RabbitMQ users
|
||||
|
||||
tasks:
|
||||
hosts: rabbitmq-stg[0]
|
||||
user: root
|
||||
gather_facts: False
|
||||
|
||||
tasks:
|
||||
- name: Create the RabbitMQ user
|
||||
rabbitmq_user:
|
||||
user: messaging-bridges
|
||||
vhost: /pubsub
|
||||
read_priv: .*
|
||||
write_priv: .*
|
||||
tags:
|
||||
- config
|
||||
- name: Create the RabbitMQ exchanges
|
||||
rabbitmq_exchange:
|
||||
name: "{{item}}"
|
||||
exchange_type: topic
|
||||
vhost: /pubsub
|
||||
with_items:
|
||||
- amq.topic
|
||||
- zmq.topic
|
||||
tags:
|
||||
- config
|
||||
- name: Create the RabbitMQ queues
|
||||
rabbitmq_queue:
|
||||
name: "{{item}}"
|
||||
vhost: /pubsub
|
||||
with_items:
|
||||
- amqp_to_zmq
|
||||
- amqp_bridge_verify_missing
|
||||
tags:
|
||||
- config
|
||||
- name: Create the amqp-to-zmq bindings
|
||||
rabbitmq_binding:
|
||||
source: amq.topic
|
||||
destination: amqp_to_zmq
|
||||
vhost: /pubsub
|
||||
tags:
|
||||
- config
|
||||
- name: Create the verify-missing bindings
|
||||
rabbitmq_binding:
|
||||
source: "{{item}}"
|
||||
destination: amqp_bridge_verify_missing
|
||||
vhost: /pubsub
|
||||
with_items:
|
||||
- amq.topic
|
||||
- zmq.topic
|
||||
tags:
|
||||
- config
|
||||
|
||||
|
||||
# Now create the app
|
||||
|
||||
- name: make the app be real
|
||||
hosts: os-masters-stg[0]
|
||||
user: root
|
||||
|
|
|
@ -7,7 +7,7 @@ metadata:
|
|||
app: messaging-bridges
|
||||
data:
|
||||
config.toml: |-
|
||||
amqp_url = "amqps://rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org"
|
||||
amqp_url = "amqps://messaging-bridges@rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org/pubsub"
|
||||
publish_exchange = "amq.topic"
|
||||
|
||||
[tls]
|
||||
|
@ -43,7 +43,7 @@ data:
|
|||
level = "WARNING"
|
||||
handlers = ["console"]
|
||||
amqp-to-zmq.toml: |-
|
||||
amqp_url = "amqps://rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org"
|
||||
amqp_url = "amqps://messaging-bridges@rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org/pubsub"
|
||||
publish_exchange = "amq.topic"
|
||||
|
||||
[[bindings]]
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
tags:
|
||||
- rabbitmq_cluster
|
||||
|
||||
- name: Nope. No standard users. Even if we user TLS auth
|
||||
- name: Nope. No standard users. Even if we use TLS auth
|
||||
rabbitmq_user: user=guest state=absent
|
||||
tags:
|
||||
- rabbitmq_cluster
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue