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

15 lines
435 B
YAML

---
- name: Add rabbitmq cluster hosts
lineinfile:
dest: /etc/hosts
line: "{{ hostvars[item].rabbitmq_cluster_ip_address | default(hostvars[item].ansible_default_ipv4.address) }} {{ hostvars[item].ansible_hostname }}"
with_items: "{{ ansible_play_hosts }}"
- name: Set erlang cookie
template:
src: erlang.cookie.j2
dest: "{{ rabbitmq_erlang_cookie_file }}"
owner: rabbitmq
group: rabbitmq
mode: 0400