20 lines
675 B
YAML
20 lines
675 B
YAML
---
|
|
|
|
# Migration check from rsync deployment
|
|
- name: ANSISTRANO | Get current folder
|
|
stat:
|
|
path: "{{ ansistrano_deploy_to }}/{{ ansistrano_current_dir }}"
|
|
register: stat_current_dir
|
|
|
|
- name: ANSISTRANO | Remove current folder if it's a directory
|
|
file:
|
|
state: absent
|
|
path: "{{ ansistrano_deploy_to }}/{{ ansistrano_current_dir }}"
|
|
when: stat_current_dir.stat.isdir is defined and stat_current_dir.stat.isdir
|
|
|
|
# Performs symlink exchange
|
|
- name: ANSISTRANO | Change softlink to new release
|
|
file:
|
|
state: link
|
|
path: "{{ ansistrano_deploy_to }}/{{ ansistrano_current_dir }}"
|
|
src: "./{{ ansistrano_version_dir }}/{{ ansistrano_release_version }}"
|