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

36 lines
681 B
YAML

---
- name: Install ansible dependencies
apt:
name: "python3-requests"
state: present
- name: Install rabbitmq package
apt:
name: rabbitmq-server
state: present
with_items:
- rabbitmq-server
- python3-requests
- 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: "/"