Closed pzaj2 closed 7 years ago
It looks like there is an IO problem while trying to write files in your vagrant box disk
This particular command rsyncs from a shared directory where we run git commands to your final releases folder
It does not look like anything related to ansible or ansistrano but a problem in the virtual machine itself. Hard to diagnose better without further info.
Have you ever been able to deploy anything at all? Is the virtual disk full?
@ricardclau I see, well, I wasn't able to deploy anything BUT, the repo has been pulled and written to /home/vagrant/www/develop/repo
. I also have releases
there (/home/vagrant/www/develop/releases
). One thing I noticed is the path for mkdir
command, it doesn't seem to make sense. Perhaps that's the problem?
I said I wasn't able to deploy anything, but that's not correct - I managed to make ansible install nginx, php, mysql, imagemagick, node.js.
As for my vagrant box, I think there's enough space:
vagrant@vagrant:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 225M 0 225M 0% /dev
tmpfs 49M 1.9M 47M 4% /run
/dev/mapper/vagrant--vg-root 38G 1.9G 35G 6% /
tmpfs 245M 0 245M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 245M 0 245M 0% /sys/fs/cgroup
/dev/sda1 472M 58M 391M 13% /boot
vagrant 135G 84G 52G 62% /vagrant
vagrant_data 135G 84G 52G 62% /vagrant_data
tmpfs 49M 0 49M 0% /run/user/1000
Ah yeah, I see the problem
ansistrano_deploy_to: "www/{{ branch }}"
This would be relative to the playbook, probably not exactly where you want to put it
Try it with
ansistrano_deploy_to: "/home/vagrant/www/{{ branch }}"
@ricardclau hmm, that makes sense. Although I'm quite surprised, since my playbook is on local machine... why would my local machine (the one playbook is run at) have any part in this? Is ansistrano_deploy_from
part of that too? I tried to understand the need for it, but I can't find any use of that. Anyway, thanks for help, I will try that in the meantime.
deploy_from is not used in the git strategy, it is used in strategies like copy, rsync, etc... deploy_to is a path in the server you deploy to and either you put an absolute path or it will be relative to where the command is executed. If you check that particular one (https://github.com/ansistrano/deploy/blob/master/tasks/update-code/git.yml#L58:L70), there is a
args:
chdir: "{{ ansistrano_deploy_to }}/repo/"
Which is exactly what is happening to you
Mistery solved!
Hi
I have this huge issue with anistrano. I couldn't find any answers related to it. Now I have idea why this is happening, to be honest I'm not sure what this task is meant to accomplish. I'm trying to deploy to vagrant box. This is error I'm getting:
My vars are:
and I only use a single role at this moment -