2023-09-11 18:31:03 +02:00
|
|
|
---
|
2023-10-06 12:05:33 +02:00
|
|
|
- name: clean consul alpine distribution config
|
|
|
|
file:
|
|
|
|
state: absent
|
|
|
|
path: /etc/consul/server.json
|
|
|
|
|
2023-09-11 18:31:03 +02:00
|
|
|
- name: get the encrypt_key
|
|
|
|
ansible.builtin.command:
|
|
|
|
cmd: cat /etc/consul/gossip.key
|
|
|
|
register: gossip
|
|
|
|
become: true
|
|
|
|
changed_when: false
|
|
|
|
|
|
|
|
- name: set the consul.json config file
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: consul.json.j2
|
|
|
|
dest: /etc/consul/consul.json
|
|
|
|
mode: 0600
|
|
|
|
owner: consul
|
|
|
|
become: true
|