rabbitmq/tasks/rabbitmq.yaml
2023-02-08 01:38:33 +03:00

32 lines
631 B
YAML

---
- name: Include rabbitmq installation tasks
include: "{{ ansible_os_family }}/install.yaml"
- include: configure.yaml
- include: configure-cluster.yaml
when: rabbitmq_cluster
- name: Start rabbitmq server
service:
name: rabbitmq-server
enabled: True
state: started
- block:
- include: vhosts.yaml
- include: ha_policy.yaml
- include: users.yaml
when:
- rabbitmq_cluster
- ansible_hostname == hostvars[ansible_play_hosts.0].ansible_hostname
- block:
- include: vhosts.yaml
- include: ha_policy.yaml
- include: users.yaml
when:
- not rabbitmq_cluster
- include: plugins.yaml