Initial experiences: apparent hangs.

Hey all,

I just started using Ansible and I thought I would post my initial experiences in order that you can see the stumbling blocks I had along the way. So a disclaimer, I haven’t used any configuration management before and I had just done some surfing up of the differences between (Chef, Puppet, Saltstack, and then Ansible) From the documentation Ansible looks quite nice!

So my initial experience was:

I ensured I had ssh-agent running and got ssh into two different VM hosts that I set up to experiment on. I got the command line examples going with ping etc.

Then the first time I actually tried to get a playbook to go, I looked for an example on the net, copied it over and cut it down and ansible appeared to be hanging. I cut more and more out tried simpler and simpler things, until I finally got down to the following simple sort of thing:

  • hosts: all
    gather_facts: false
    sudo: true
    tasks:
  • name: Ping the server
    ping:

But even this still hung. After googling around for hangs in Ansible, how to turn feedback on, finding out about the verbose command line option (which appeared to do nothing in this case, etc), trying to find out where ansible puts its log files, etc. I then stumbled across someone else having the same problems and found that my command line should have been:

ansible-playbook -v simpletest.yml -K

instead of

ansible-playbook -v simpletest.yml

This was not as smooth a beginning as I had hoped for. Of course one can easily say this is user error, but still the process appears to me that it could definitely be smother here. Is there a way to give better feedback that things are somehow waiting on a sudo password that I can’t appear to enter?

Thanks,
Jason

This is just the way the sudo support works, if it’s asking for a sudo prompt you need to supply -K.

Patches welcome if you can do better.