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

18 lines
506 B
YAML

- name: Check if witness INI file exists
stat:
path: /etc/vn.ini
register: witness_file
- name: Set witness related variables
set_fact:
vn_first_time: "{{ not witness_file.stat.exists }}"
vn_witness_checked: true
- when: not vn_first_time
block:
- name: Slurp witness INI file
slurp:
src: /etc/vn.ini
register: vn_ini_file
- name: Put witness as dictionary into variable
set_fact:
vn_ini: "{{ vn_ini_file.content | b64decode | community.general.from_ini }}"