21 lines
435 B
YAML
21 lines
435 B
YAML
---
|
|
- name: clean consul alpine distribution config
|
|
file:
|
|
state: absent
|
|
path: /etc/consul/server.json
|
|
|
|
- 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
|