Skip to content

Commit

Permalink
[backup] Add backup support when uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Jun 28, 2024
1 parent bb2d89d commit 759a6c7
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions ansible/roles/ovos_installer/tasks/ovos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
---
- name: Define directories to backup before uninstall
ansible.builtin.set_fact:
ovos_directories_backup:
- "{{ ovos_installer_user_home }}/ovos"
- "{{ ovos_installer_user_home }}/hivemind"
- "{{ ovos_installer_user_home }}/.config/wireplumber"
when: ovos_installer_method == "containers"
tags:
- uninstall

- name: Define directories to backup before uninstall
ansible.builtin.set_fact:
ovos_directories_backup:
- "{{ ovos_installer_user_home }}/.config/systemd"
- "{{ ovos_installer_user_home }}/.config/mycroft"
- "{{ ovos_installer_user_home }}/.config/hivemind"
- "{{ ovos_installer_user_home }}/.config/OpenVoiceOS"
- "{{ ovos_installer_user_home }}/.config/wireplumber"
- "{{ ovos_installer_user_home }}/.local/share/hivemind"
when: ovos_installer_method == "virtualenv"
tags:
- uninstall

- name: Backup existing configurations before uninstall
community.general.archive:
path: "{{ ovos_directories_backup }}"
dest: "{{ ovos_installer_user_home }}/"
owner: "{{ ovos_installer_user }}"
group: "{{ ovos_installer_group }}"
mode: "0755"
format: bz2
tags:
- uninstall

- name: Create directories
ansible.builtin.file:
path: "{{ item.directory }}"
Expand Down

0 comments on commit 759a6c7

Please sign in to comment.