Repair malformed Seriatim build state directories
This commit is contained in:
@@ -60,6 +60,29 @@
|
||||
Seriatim binary path exists but is not a regular file:
|
||||
{{ seriatim_binary_path }}. Move the unexpected object before rerunning the role.
|
||||
|
||||
- name: Inspect Seriatim build state directory
|
||||
ansible.builtin.stat:
|
||||
path: "{{ seriatim_build_state_dir }}"
|
||||
register: seriatim_build_state_dir_stat
|
||||
|
||||
- name: Remove malformed Seriatim build state directory object
|
||||
ansible.builtin.file:
|
||||
path: "{{ seriatim_build_state_dir }}"
|
||||
state: absent
|
||||
when:
|
||||
- seriatim_build_state_dir_stat.stat.exists or
|
||||
(seriatim_build_state_dir_stat.stat.islnk | default(false))
|
||||
- not (seriatim_build_state_dir_stat.stat.isdir | default(false))
|
||||
|
||||
- name: Create missing Seriatim build state directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ seriatim_build_state_dir }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0755"
|
||||
when: not (seriatim_build_state_dir_stat.stat.isdir | default(false))
|
||||
|
||||
- name: Inspect Seriatim build input state
|
||||
ansible.builtin.stat:
|
||||
path: "{{ seriatim_build_state_dir }}/build-inputs.json"
|
||||
|
||||
Reference in New Issue
Block a user