Looks like it needs a full task not a delegate_to

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2019-03-04 15:08:14 +01:00
parent c3d64514c1
commit 0e87532f03

View file

@ -67,15 +67,28 @@
- import_tasks: "{{ handlers_path }}/restart_services.yml" - import_tasks: "{{ handlers_path }}/restart_services.yml"
# Set up for fedora-messaging # Set up for fedora-messaging
- name: Create the user in RabbitMQ - name: setup RabbitMQ
delegate_to: "rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org" hosts: rabbitmq[0]:rabbitmq-stg[0]
rabbitmq_user: user: root
user: "pagure{{ env_suffix }}" gather_facts: False
vhost: "/pubsub"
read_priv: "^$" # Not sending any messages, no need for read vars_files:
write_priv: "^amq\\.topic$" # Write to queues prefixed with their name and publish to the topic exchange - /srv/web/infra/ansible/vars/global.yml
configure_priv: "^$" # No configuration permissions - "/srv/private/ansible/vars.yml"
state: present - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- name: Create the RabbitMQ user
rabbitmq_user:
user: "pagure{{ env_suffix }}"
vhost: /pubsub
read_priv: "^$"
write_priv: "amq\\.topic"
configure_priv: "^$"
state: present
tags:
- config
- fedora-messaging
- name: setup fedmsg on pkgs - name: setup fedmsg on pkgs
hosts: pkgs-stg:pkgs02.phx2.fedoraproject.org hosts: pkgs-stg:pkgs02.phx2.fedoraproject.org