vn-ansible/roles/debian-base/tasks/witness.yml

13 lines
323 B
YAML
Raw Normal View History

- name: Check if witness file exists
2024-10-16 15:53:15 +00:00
stat:
path: /etc/vn.witness
register: witness_file
- name: Set the witness variable
2024-10-16 15:53:15 +00:00
set_fact:
vn_first_time: "{{ not witness_file.stat.exists }}"
- name: Create the witness file if it does not exist
2024-10-16 15:53:15 +00:00
file:
path: /etc/vn.witness
state: touch
when: vn_first_time