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

36 lines
681 B
YAML
Raw Normal View History

2020-02-07 12:38:30 +00:00
---
- name: Install ansible dependencies
apt:
2022-01-02 16:26:47 +00:00
name: "python3-requests"
2020-02-07 12:38:30 +00:00
state: present
- name: Install rabbitmq package
apt:
name: rabbitmq-server
state: present
2022-01-02 16:26:47 +00:00
with_items:
- rabbitmq-server
- python3-requests
2020-02-07 12:38:30 +00:00
- 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: "/"