2024-10-21 05:56:39 +00:00
|
|
|
- name: Check if witness INI file exists
|
2024-10-16 15:53:15 +00:00
|
|
|
stat:
|
2024-10-21 05:56:39 +00:00
|
|
|
path: /etc/vn.ini
|
2024-10-20 12:12:46 +00:00
|
|
|
register: witness_file
|
2024-10-21 05:56:39 +00:00
|
|
|
- name: Set witness related variables
|
2024-10-16 15:53:15 +00:00
|
|
|
set_fact:
|
2024-10-20 12:12:46 +00:00
|
|
|
vn_first_time: "{{ not witness_file.stat.exists }}"
|
2024-10-21 05:56:39 +00:00
|
|
|
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 }}"
|