1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Ansible_Project/roles/ansistrano.deploy/tasks/symlink.yml
2022-05-02 17:37:08 +02:00

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 }}"