{"action":"closed","issue":{"url":"https://api.github.com/repos/ansistrano/deploy/issues/120","repository_url":"https://api.github.com/repos/ansistrano/deploy","labels_url":"https://api.github.com/repos/ansistrano/deploy/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/ansistrano/deploy/issues/120/comments","events_url":"https://api.github.com/repos/ansistrano/deploy/issues/120/events","html_url":"https://github.com/ansistrano/deploy/issues/120","id":153111885,"number":120,"title":"Symlink is failing finding the src","user":{"login":"luishdez","id":38347,"avatar_url":"https://avatars.githubusercontent.com/u/38347?v=3","gravatar_id":"","url":"https://api.github.com/users/luishdez","html_url":"https://github.com/luishdez","followers_url":"https://api.github.com/users/luishdez/followers","following_url":"https://api.github.com/users/luishdez/following{/other_user}","gists_url":"https://api.github.com/users/luishdez/gists{/gist_id}","starred_url":"https://api.github.com/users/luishdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luishdez/subscriptions","organizations_url":"https://api.github.com/users/luishdez/orgs","repos_url":"https://api.github.com/users/luishdez/repos","events_url":"https://api.github.com/users/luishdez/events{/privacy}","received_events_url":"https://api.github.com/users/luishdez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-04T20:51:32Z","updated_at":"2016-05-04T21:13:31Z","closed_at":"2016-05-04T21:13:31Z","body":"Maybe I'm missing something\r\n\r\n```\r\nTASK [carlosbuenosvinos.ansistrano-deploy : ANSISTRANO | Ensure shared paths targets are absent] ***\r\nchanged: [webserver] => (item=app/data/)\r\n\r\nTASK [carlosbuenosvinos.ansistrano-deploy : ANSISTRANO | Create softlinks for shared paths 2] ***\r\nfailed: [webserver] => (item=app/data/) => {\"failed\": true, \"item\": \"app/data/\", \"msg\": \"src file does not exist, use \\\"force=yes\\\" if you really want to create the link: /var/www/vhosts/adrobot/releases/20160504204058Z/app/data/../../../../shared/app/data/\", \"path\": \"/var/www/vhosts/adrobot/releases/20160504204058Z/app/data/\", \"src\": \"../../../../shared/app/data/\", \"state\": \"absent\"}\r\n```\r\n\r\nI have app/data/ as a shared. First app/data in release is removed \r\n\r\n```yaml\r\n# Ensure symlinks target paths is absent\r\n- name: ANSISTRANO | Ensure shared paths targets are absent\r\n  file:\r\n    state: absent\r\n    path: \"{{ ansistrano_release_path.stdout }}/{{ item }}\"\r\n  with_items: \"{{ ansistrano_shared_paths }}\"\r\n```\r\n\r\nJust next is trying to create a symlink using the path that has been removed previously. \r\n\r\n```yaml\r\n# Symlinks shared paths\r\n- name: ANSISTRANO | Create softlinks for shared paths\r\n  file:\r\n    state: link\r\n    path: \"{{ ansistrano_release_path.stdout }}/{{ item }}\"\r\n    src: \"{{ item | regex_replace('[^\\\\/]*', '..') }}/../shared/{{ item }}\"\r\n  with_items: \"{{ ansistrano_shared_paths }}\"\r\n```\r\n\r\nBut looks that it doesn't find the src apparently\r\n\r\nThis is my setup\r\n\r\n```yml\r\n---\r\n- name: Deploys Application\r\n  hosts: webserver\r\n  user: deploy\r\n\r\n  vars:\r\n    ansistrano_allow_anonymous_stats: no\r\n    ansistrano_deploy_from: \"{{ playbook_dir}}/../\"\r\n    ansistrano_deploy_to: /var/www/vhosts/adrobot\r\n    ansistrano_keep_releases: 4\r\n    ansistrano_after_cleanup_tasks_file: \"{{ playbook_dir}}/hooks//after-cleanup.yml\"\r\n    ansistrano_shared_paths:\r\n      - app/data/\r\n\r\n  roles:\r\n    - carlosbuenosvinos.ansistrano-deploy\r\n```\r\n\r\nThe file structure\r\n```\r\napp\r\n  - data\\\r\ndeployer\r\n  - deploy.yml\r\n  ...\r\n```\r\n\r\nThanks a lot.\r\n"}}