rabbitmq/tasks/configure-cluster.yaml

15 lines
435 B
YAML
Raw Permalink Normal View History

2023-02-07 22:38:33 +00:00
---
- 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