TASK: [deploy | Create shared symlinks] ***************************************
failed: [104.131.107.162] => (item={'path': 'web/app/uploads', 'src': 'uploads'}) => {"failed": true, "item": {"path": "web/app/uploads", "src": "uploads"}, "path": "/srv/www/domain.com/releases/20150502152244/web/app/uploads", "state": "absent"}
msg: Error while linking: [Errno 2] No such file or directory
FATAL: all hosts have already failed -- aborting
Is this still happening? If so make sure you have least bedrock-ansible code. I vaguely remember some changes to do with this.
I got this error as well on my first deploy. Will try to update bedrock-ansible.
No, it is not. I cloned the latest version of bedrock ansible and it went away. Whatever changes you folks implemented, it fixed the issue.
I’m sorry, but I’ve tried updating bedrock-ansible now by cloning it and inserting my details into /group_vars/staging and /hosts/staging, but I still get the same fail. Any ideas on what I should try next to get my deploy working?
TASK: [deploy | Create shared symlinks] ***************************************
failed: [ip] => (item={'path': 'web/app/uploads', 'src': 'uploads'}) => {"failed": true, "item": {"path": "web/app/uploads", "src": "uploads"}, "path": "/srv/www/domain.com/releases/20150511170726/web/app/uploads", "state": "absent"}
msg: Error while linking: [Errno 2] No such file or directory
FATAL: all hosts have already failed -- aborting
I just ended up cloning https://github.com/roots/roots-example-project.com and redoing my details and copying over the old bedrock site into site
and it worked fine.
Just ran into this same issue. If anyone set’s up their project like the roots example project, make sure to add subtree: site
to their group_vars/production
and staging files.
I have a similar problem. I’ve just cloned the latest Bedrock-ansible. Everything works smoothly with the provisioning, but when I come to deploy I get:
fatal: [xx.xxx.xx.xxx] => One or more undefined variables: 'dict object' has no attribute 'subtree'
FATAL: all hosts have already failed -- aborting
If I add subtree: site to production and staging group_vars I get:
TASK: [deploy | Move project subtree into root folder] ************************
failed: [xx.xxx.xx.xxx] => {"changed": true, "cmd": "mv /srv/www/test.co.uk/releases/20150527074840/site/* /srv/www/test.co.uk/releases/20150527074840", "delta": "0:00:00.004921", "end": "2015-05-27 07:48:52.973108", "rc": 1, "start": "2015-05-27 07:48:52.968187", "warnings": []}
stderr: mv: cannot stat ‘/srv/www/test.co.uk/releases/20150527074840/site/*’: No such file or directory
FATAL: all hosts have already failed -- aborting
Okay so now I understand what a subtree is. I have my site and ansible directories in different git repos, so I don’t need to use subtrees at all. I’ve tried reverting roles/deploy.defaults/main.yml to the previous version to no avail.
I had a look at the commit history on github and checked out the previous versions of both roles/deploy/defaults/main.yml and roles/deploy/tasks/main.yml and now I’m up and running again.
Are you saying that the very latest commit on master was giving you that error?
https://github.com/roots/bedrock-ansible/commit/56045fc3a05adc5c4cccfc805ee61814a705ac19 this commit should have fixed it.
Yes.
Let me check again just to make sure I’ve not done something stupid.
So I cloned a fresh copy and it’s all working again now. I’ve no idea what went wrong before.
The previous clone must have been older than I realised.
Sorry for wasting your time!
Going to close this thread since it was an actual bug that’s been fixed.