robocar-setup/ansible/roles/rabbitmq/tasks/main.yml

33 lines
621 B
YAML
Raw Normal View History

2020-02-07 12:38:30 +00:00
---
- 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: "/"