diff --git a/tasks/main.yml b/tasks/main.yml index 2e7a41c1..27a007a3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,6 +23,10 @@ - include_tasks: nexus_purge.yml when: nexus_purge | default(false) | bool +- name: "Digest splited blob list var" + include_vars: blob_vars.yml + when: nexus_blob_split | bool + - import_tasks: nexus_install.yml - include_tasks: httpd_reverse_proxy_config.yml @@ -93,10 +97,6 @@ {%- endfor -%} {{ result | to_json | from_json }} - - name: "Digest splited blob list var" - include_vars: blob_vars.yml - when: nexus_blob_split | bool - - name: Create/Check blobstores when: nexus_restore_point is undefined block: diff --git a/templates/nexus-blob-restore.sh.j2 b/templates/nexus-blob-restore.sh.j2 index 6c5056f0..97a356cd 100644 --- a/templates/nexus-blob-restore.sh.j2 +++ b/templates/nexus-blob-restore.sh.j2 @@ -24,8 +24,8 @@ else rm -rf ${data_dir}/db/* rm -rf ${data_dir}/blobs/* sudo -u {{ nexus_os_user }} cp ${backup_dir}/${blob_dir}/db/* ${db_restore_dir} - {% for item in nexus_blobstores %} +{% for item in nexus_blobstores %} sudo -u {{ nexus_os_user }} cp -r ${backup_dir}/${blob_dir}/{{ item.name }} ${data_dir}/blobs/ - {% endfor %} +{% endfor %} sudo -u {{ nexus_os_user }} cp -r ${backup_dir}/${blob_dir}/default ${data_dir}/blobs/ fi