diff --git a/roles/role_deploy_SemanticScuttle/tasks/main.yml b/roles/role_deploy_SemanticScuttle/tasks/main.yml index 2d25016..c2c7cd0 100644 --- a/roles/role_deploy_SemanticScuttle/tasks/main.yml +++ b/roles/role_deploy_SemanticScuttle/tasks/main.yml @@ -49,7 +49,7 @@ - name: restore volume backup ansible.builtin.command: - cmd: "duplicity restore --file-to-restore {{ item }}.tar.gz --do-not-restore-ownership --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} swift://backup_ovh1 {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz" + cmd: "duplicity restore --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} --name {{ item }} swift://{{ item }} /mnt/volumes/{{ item }}/data" environment: SWIFT_USERNAME: "{{ OS_USERNAME }}" SWIFT_PASSWORD: "{{ OS_PASSWORD }}" @@ -69,15 +69,6 @@ changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0 when: not scuttle_installed_flag.stat.exists -- name: Unarchive volume backup - ansible.builtin.command: - cmd: "tar -xzvf {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz -C /mnt/volumes/{{ item }}/data --strip 2" - become: true - with_items: - - scuttle_code - - scuttle_php5-fpm_conf - when: not scuttle_installed_flag.stat.exists - - name: Login to {{ private_registry_domain }} and create ${XDG_RUNTIME_DIR}/containers/auth.json containers.podman.podman_login: username: "{{ private_registry_user }}" diff --git a/roles/role_deploy_grafana/tasks/main.yml b/roles/role_deploy_grafana/tasks/main.yml index 90b0380..880eb59 100644 --- a/roles/role_deploy_grafana/tasks/main.yml +++ b/roles/role_deploy_grafana/tasks/main.yml @@ -46,7 +46,7 @@ - name: restore volume backup ansible.builtin.command: - cmd: "duplicity restore --file-to-restore {{ item }}.tar.gz --do-not-restore-ownership --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} swift://backup_ovh1 {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz" + cmd: "duplicity restore --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} --name {{ item }} swift://{{ item }} /mnt/volumes/{{ item }}/data" environment: SWIFT_USERNAME: "{{ OS_USERNAME }}" SWIFT_PASSWORD: "{{ OS_PASSWORD }}" @@ -67,16 +67,6 @@ changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0 when: not grafana_installed_flag.stat.exists -- name: Unarchive volume backup - ansible.builtin.command: - cmd: "tar -xzvf {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz -C /mnt/volumes/{{ item }}/data --strip 2" - become: true - with_items: - - etc_grafana - - var_lib_grafana - - var_log_grafana - when: not grafana_installed_flag.stat.exists - - name: Create podman networks containers.podman.podman_network: name: "{{ item }}" diff --git a/roles/role_deploy_nextcloud/tasks/main.yml b/roles/role_deploy_nextcloud/tasks/main.yml index c9d9316..4738223 100644 --- a/roles/role_deploy_nextcloud/tasks/main.yml +++ b/roles/role_deploy_nextcloud/tasks/main.yml @@ -28,7 +28,7 @@ - name: restore volume backup ansible.builtin.command: - cmd: "duplicity restore --file-to-restore {{ item }}.tar.gz --do-not-restore-ownership --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} swift://backup_ovh1 {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz" + cmd: "duplicity restore --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} --name {{ item }} swift://{{ item }} /mnt/volumes/{{ item }}/data" environment: SWIFT_USERNAME: "{{ OS_USERNAME }}" SWIFT_PASSWORD: "{{ OS_PASSWORD }}" @@ -47,14 +47,6 @@ changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0 when: not nextcloud_installed_flag.stat.exists -- name: Unarchive volume backup - ansible.builtin.command: - cmd: "tar -xzvf {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz -C /mnt/volumes/{{ item }}/data --strip 2" - become: true - with_items: - - nextcloud - when: not nextcloud_installed_flag.stat.exists - - name: Create /usr/local/docker-mounted-files/docker-nextcloud-stack directory ansible.builtin.file: path: "/usr/local/docker-mounted-files/docker-nextcloud-stack" diff --git a/roles/role_deploy_registry/tasks/main.yml b/roles/role_deploy_registry/tasks/main.yml index adc3065..779f2b3 100644 --- a/roles/role_deploy_registry/tasks/main.yml +++ b/roles/role_deploy_registry/tasks/main.yml @@ -54,7 +54,7 @@ - name: restore volume backup ansible.builtin.command: - cmd: "duplicity restore --file-to-restore {{ item }}.tar.gz --do-not-restore-ownership --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} swift://backup_ovh1 {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz" + cmd: "duplicity restore --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} --name {{ item }} swift://{{ item }} /mnt/volumes/{{ item }}/data" environment: SWIFT_USERNAME: "{{ OS_USERNAME }}" SWIFT_PASSWORD: "{{ OS_PASSWORD }}" @@ -75,16 +75,6 @@ changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0 when: not registry_installed_flag.stat.exists -- name: Unarchive volume backup - ansible.builtin.command: - cmd: "tar -xzvf {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz -C /mnt/volumes/{{ item }}/data --strip 2" - become: true - with_items: - - registry_data - - registry_auth - - registry_certs - when: not registry_installed_flag.stat.exists - - name: Create podman networks containers.podman.podman_network: name: "{{ item }}" diff --git a/tasks/deploy_gogs.yml b/tasks/deploy_gogs.yml index 01f1b8a..9b139da 100644 --- a/tasks/deploy_gogs.yml +++ b/tasks/deploy_gogs.yml @@ -28,7 +28,7 @@ - name: restore volume backup ansible.builtin.command: - cmd: "duplicity restore --file-to-restore {{ item }}.tar.gz --do-not-restore-ownership --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} swift://backup_ovh1 {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz" + cmd: "duplicity restore --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} --name {{ item }} swift://{{ item }} /mnt/volumes/{{ item }}/data" environment: SWIFT_USERNAME: "{{ OS_USERNAME }}" SWIFT_PASSWORD: "{{ OS_PASSWORD }}" @@ -47,14 +47,6 @@ changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0 when: not gogs_installed_flag.stat.exists -- name: Unarchive volume backup - ansible.builtin.command: - cmd: "tar -xzvf {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz -C /mnt/volumes/{{ item }}/data --strip 2" - become: true - with_items: - - gogs_data - when: not gogs_installed_flag.stat.exists - - name: Create gogs container containers.podman.podman_container: name: gogs diff --git a/tasks/mysql-server_install_from_backup_stage_1.yml b/tasks/mysql-server_install_from_backup_stage_1.yml index 54f578f..784118d 100644 --- a/tasks/mysql-server_install_from_backup_stage_1.yml +++ b/tasks/mysql-server_install_from_backup_stage_1.yml @@ -63,7 +63,7 @@ - name: restore volume backup ansible.builtin.command: - cmd: "duplicity restore --file-to-restore {{ item }}.tar.gz --do-not-restore-ownership --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} swift://backup_ovh1 {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz" + cmd: "duplicity restore --archive-dir {{ DUPLICITY_ARCHIVE_DIR }} --name {{ item }} swift://{{ item }} /mnt/volumes/{{ item }}/data" environment: SWIFT_USERNAME: "{{ OS_USERNAME }}" SWIFT_PASSWORD: "{{ OS_PASSWORD }}" @@ -81,9 +81,3 @@ failed_when: duplicity_result is failed and (duplicity_result.rc is not defined or duplicity_result.rc != 11) changed_when: duplicity_result.rc is defined and duplicity_result.rc == 0 -- name: Unarchive volume backup - ansible.builtin.command: - cmd: "tar -xzvf {{ DUPLICITY_WORKDIR }}/{{ item }}.tar.gz -C /mnt/volumes/{{ item }}/data --strip 2" - become: true - with_items: - - mysql-server_dumps