Crony : Structure du projet

This commit is contained in:
Michael RICOIS 2017-03-03 15:21:43 +01:00
parent fb7c7d9ddd
commit 6ed7b4f4d3
2 changed files with 20 additions and 1 deletions

View File

@ -25,7 +25,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
#ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
#ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -0,0 +1,19 @@
---
- name: CRONY | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: CRONY | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: CRONY | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'log' }
- stat:
path: "{{ansistrano_deploy_to}}/shared/sources"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/sources"
when: st.stat.islnk is not defined or st.stat.islnk == False