33 lines
621 B
YAML
33 lines
621 B
YAML
|
---
|
||
|
- name: Install ansible dependencies
|
||
|
apt:
|
||
|
name: "python-requests"
|
||
|
state: present
|
||
|
|
||
|
- name: Install rabbitmq package
|
||
|
apt:
|
||
|
name: rabbitmq-server
|
||
|
state: present
|
||
|
|
||
|
- name: Enables rabbitmq plugins
|
||
|
rabbitmq_plugin:
|
||
|
names: rabbitmq_management,rabbitmq_mqtt
|
||
|
state: enabled
|
||
|
|
||
|
- name: Add rabbitmq user
|
||
|
rabbitmq_user:
|
||
|
user: "{{ rabbitmq_user }}"
|
||
|
password: "{{ rabbitmq_password }}"
|
||
|
vhost: /
|
||
|
configure_priv: .*
|
||
|
read_priv: .*
|
||
|
write_priv: .*
|
||
|
tags: administrator
|
||
|
state: present
|
||
|
|
||
|
- name: Create exchange
|
||
|
rabbitmq_exchange:
|
||
|
name: car
|
||
|
type: topic
|
||
|
vhost: "/"
|