Gilles, I have magically resolved the blocking issue by adding the option '-o UserKnownHostsFile=/dev/null', together with the option '-o StrictHostKeyChecking=no'. I tried this solution with both Ubuntu 12.04 and 14.04 and didn't get any issue at all. I, however, have yet to find the rationale behind this solution as why would it resolve the blocking issue. I believe it has something to do with the default known hosts file used by Ansible, either that it's having trouble writing to the file or the file it writes to is different from the known hosts file it reads from. Just a wild guess from me and it's pending investigation. Anyhow, please give the mentioned solution a try and share your result with us.
On Saturday, May 10, 2014 9:39:02 AM UTC-7, Gilles Cornu wrote: > > tamakisquare, > > Thanks for feedback, and sorry for bad suspicion on potential root abuse > ;-) > > For me everything behaves the same on Ubuntu 12.04 and 14.04 flavors. Do > you still observe this problem on 14.04? > I suspect (again!) that you might experienced some "transient" troubles, > maybe due to ControlMaster delays (in my experience, setting > ControlMaster=no during debugging phase can help). > > For completeness, I should mention that during my tests, I faced another > problem (on both ubuntu boxes): `accept_hostkey=yes` or `ssh_opts='-o > StrictHostKeyChecking=no'` options of the git module do not work for me, > and the task hung. So far I could fix it by filling ~/.ssh/known_hosts via > other means (see also https://github.com/ansible/ansible/issues/6358 by > the way). As I did not find any github issues nor mailing list topic > referring to similar problem, I assume so far that I am doing something > wrong on my end and will further investigate (and maybe report in a > separate thread). Note that based on > https://groups.google.com/d/topic/ansible-project/d5OVhIWQ8AI/discussion, > I also compared ansible v1.6.1 and v1.5.3, but I got exactly the same > blocking issue with the git task. > > > Michael, > > Here some details current status of Vagrant support for Ansible > provisioning: > > As of Vagrant 1.5.0, the Ansible provisioner > supportsconfig.ssh.forward_agentfrom Vagrant settings to auto-configure > ansible-playbook command with > --connection=ssh and ANSIBLE_SSH_ARGS='-o ForwardAgent=yes ...'. With older > Vagrant versions, it was indeed necessary to manually tweak these > parameters (via ansible.cfg, ANSIBLE_SSH_ARGS, etc.) but I hope the usages > will change overtime and less people get confused. The answer from > tamakisquare on http://stackoverflow.com/a/23554663 also confirms that > this change makes things quite simpler. > > More generally, I also would like to mention that since Vagrant 1.6.0, the > provisioner shows the complete ansible-playbook command in vagrant terminal > log, for example: > > ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false > PYTHONUNBUFFERED=1 ANSIBLE_SSH_ARGS='-o ForwardAgent=yes -o > ControlMaster=auto -o ControlPersist=60s' ansible-playbook > --private-key=/.../.vagrant.d/insecure_private_key --user=vagrant > --connection=ssh > --inventory-file=/.../.vagrant/provisioners/ansible/inventory -vv > --limit='machine*' playbook.yml > > I think that this simple addition is quite handy for support/debugging as > it makes very easy to copy-paste and tweak in a simple shell, without > having the Vagrant pipeline involved. In the future, I would propose as a > general guideline for Vagrant+Ansible users, to first check that `vagrant > provision` and pure `ansible-playbook` commands behave the same before > reporting issues to Ansible mailing list / GH issue tracker. > > Best, > Gilles > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/26a644e3-cf38-4b01-a0df-3175fd03f6e5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
