--- - name : MQ install MQ service (RabbitMQ) package: pkg: rabbitmq-server state: present - name: MQ enable rabbitmq plugins rabbitmq_plugin: names=rabbitmq_management,rabbitmq_tracing,rabbitmq_federation state=enabled notify: restart Rabbitmq - name: MQ Configuration template: src: rabbitmq-env.conf.j2 dest: /etc/rabbitmq/rabbitmq-env.conf owner: rabbitmq group: rabbitmq mode: 0644 notify: restart Rabbitmq - name: MQ Force restart RabbitMQ for conf update directly meta: flush_handlers - name: add Admin users rabbitmq_user: node: "rabbit@{{ groups['mq'][0] }}" user: "{{ mq_admin_username }}" password: "{{ mq_admin_password }}" tags: administrator,"{{ mq_admin_username }}" vhost: / configure_priv: .* write_priv: .* read_priv: .* state: present - name: remove default guest user rabbitmq_user: node: "rabbit@{{ groups['mq'][0] }}" user: guest state: absent - name: MQ Configure Splash vhost rabbitmq_vhost: node: "rabbit@{{ groups['mq'][0] }}" name: "{{ mq_splash_vhost }}" state: present - name: MQ Add Splash service user rabbitmq_user: node: "rabbit@{{ groups['mq'][0] }}" user: "{{ mq_splash_username }}" password: "{{ mq_splash_password }}" vhost: "{{ mq_splash_vhost}}" configure_priv: .* read_priv: .* write_priv: .* state: present