Batch : structure du projet avec vérification des symlinks

This commit is contained in:
Michael RICOIS 2017-03-03 14:57:54 +01:00
parent a5042aa01f
commit fb7c7d9ddd

View File

@ -6,12 +6,28 @@
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: BATCH | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared" state=directory recurse=yes
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'log' }
- name: BATCH | Project shared symlink check
stat: path="{{ansistrano_deploy_to}}/shared/clients" register=st
fail: msg="Symlink manquant {{ansistrano_deploy_to}}/shared/clients"
when: st.stat.islnk == False
- stat:
path: "{{ansistrano_deploy_to}}/shared/clients"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/clients"
when: st.stat.islnk is not defined or st.stat.islnk == False
- stat:
path: "{{ansistrano_deploy_to}}/shared/datafile"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/datafile"
when: st.stat.islnk is not defined or st.stat.islnk == False
- 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