Skip to content

Commit

Permalink
Add migration from rsync deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mblaschke committed Apr 6, 2016
1 parent d4b6d43 commit cac2815
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tasks/symlink.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
---

# Migration check from rsync deployment
- 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 }}"
src: "./{{ ansistrano_version_dir }}/{{ ansistrano_release_version }}"

0 comments on commit cac2815

Please sign in to comment.