Skip to content
Snippets Groups Projects
Commit 5c4558a3 authored by jurgenhaas's avatar jurgenhaas
Browse files

Fix finalize tasks in artefact mode

parent ea330261
No related branches found
No related tags found
No related merge requests found
......@@ -3,19 +3,33 @@
- block:
- name: Set facts
set_fact:
artefact_directories:
- src: '{{ webRoot }}/files'
dest: '{{ tempDeployRoot }}/files'
reset: true
- src: '{{ webRoot }}/settings'
dest: '{{ tempDeployRoot }}/settings'
reset: true
- src: '{{ webRoot }}/web/sites/default'
dest: '{{ tempDeployRoot }}/web/sites/default'
reset: true
- src: '{{ webRoot }}'
dest: '{{ tempDeployRoot }}-old'
- src: '{{ tempDeployRoot }}'
dest: '{{ webRoot }}'
- name: Reset destination directories
file:
path: '{{ item.dest }}'
state: absent
with_items: '{{ artefact_directories }}'
when: item.reset|default(false)
- name: Move directories
command: mv {{ item.src }} {{ item.dest }}
with_items:
- src: '{{ webRoot }}/files'
dest: '{{ tempDeployRoot }}/'
- src: '{{ webRoot }}/settings'
dest: '{{ tempDeployRoot }}/'
- src: '{{ webRoot }}/web/sites/default'
dest: '{{ tempDeployRoot }}/web/sites/'
- src: '{{ webRoot }}'
dest: '{{ webRoot }}-old'
- src: '{{ tempDeployRoot }}'
dest: '{{ webRoot }}'
with_items: '{{ artefact_directories }}'
tags:
- deploy
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment