Hi, i have symlinked uploads folder with mounted folder, and when i want to deploy, it gives me this error
TASK [deploy : Ensure shared sources are present] ******************************
failed: [production_hostname] (item={u’path’: u’web/app/uploads’, u’src’: u’uploads’}) => {“failed”: true, “gid”: 0, “group”: “root”, “item”: {“path”: “web/app/uploads”, “src”: “uploads”}, “mode”: “0777”, “msg”: “/srv/www/example.com/shared/uploads already exists as a link”, “owner”: “root”, “path”: “/srv/www/example.com/shared/uploads”, “size”: 12, “state”: “link”, “uid”: 0}
to retry, use: --limit @deploy.retry
i could find this code in share.yml
- name: Ensure shared sources are present
file:
path: “{{ deploy_helper.shared_path }}/{{ item.src }}”
state: “{{ item.type | default(‘directory’) }}”
mode: “{{ item.mode | default(‘0755’) }}”
with_items: “{{ project_shared_children }}”
but i want it on staging server so deleting is no option. Is there some way how to write there condition DO NOT DO THIS WHEN ENV == PRODUCTION? thank you