Skip to content

Commit

Permalink
[ansible/ovos] Make sure directory exists priot backup
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Jan 15, 2025
1 parent 994a80b commit 9ac731a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ansible/roles/ovos_installer/tasks/ovos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
tags:
- uninstall

- name: Check if directory to backup exists
ansible.builtin.stat:
path: "{{ ovos_directories_backup }}"
register: _ovos_installer_directory_exists
when: ovos_installer_cleaning | bool
tags:
- uninstall

- name: Backup existing configurations before uninstall
community.general.archive:
path: "{{ ovos_directories_backup }}"
Expand All @@ -23,7 +31,9 @@
mode: "0755"
format: gz
force_archive: true
when: ovos_installer_cleaning | bool
when:
- ovos_installer_cleaning | bool
- _ovos_installer_directory_exists.stat.exists | bool
tags:
- uninstall

Expand Down

0 comments on commit 9ac731a

Please sign in to comment.