Problems getting started

Hi!

I’ve heard about ansible at FrOSCon 10 and wanted to give it a try.

So I cloned it from git, switched to 1.9.2 and installed it in my Cygwin.

Now I wanted to follow http://docs.ansible.com/ansible/intro_getting_started.html

I’ve created /etc/ansible/hosts with just one host in it.

Now I’m trying to do my first

`
ansible all -m ping

`

I can connect to the host just fine with ssh. Authentication is done using pAgent and there is a jumpbox in between which is all configured in my ~/.ssh/config.

First the test failed and suggested to use -vvvv. When I did so, I noticed that ansible was using the wrong user (“cygwinme” instead of “linuxme”) despite the fact that my .ssh/config has a section:

`
Host *
User linuxme
ServerAliveInterval 300
ServerAliveCountMax 2

`

So I ran

ansible all -vvvvv -u linuxme-m ping

and got this output. I have no clue what to do next :frowning:

`
ESTABLISH CONNECTION FOR USER: linuxme
REMOTE_MODULE ping
EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=“/home/cygwinme/.ansible/cp/ansible-ssh-%h-%p-%r” -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=linuxme -o ConnectTimeout=10 myhost /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1440670972.57-249291543025148 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1440670972.57-249291543025148 && echo $HOME/.ansible/tmp/ansible-tmp-1440670972.57-249291543025148’
myhost | FAILED => SSH Error: muxserver_listen: link mux listener /home/cygwinme/.ansible/cp/ansible-ssh-myhost.my.do.main-22-linuxme.C6yJdMy7SthQH53z => /home/cygwinme/.ansible/cp/ansible-ssh-myhost.my.do.main-22-linuxme: Operation not permitted
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.

`

May be wrong at this point, but I don't think Ansible supports being run on Windiws/Cygwin... Have use use a Linux or OS X control machine.

If you only use Windows, installing VirtualBox on your PC (or any other hypervisor sw) and creating a Ubuntu control box is probably the way to go...

- Will

Hello Stephan,

I suggest you install vagrant on your windows machine. Create 2 boxes. one being the ansible box (controller or server) the second being the controlled node.

I also suggest 2 tutorials :

http://www.mycodingpains.com/introduction-to-ansible/ (Disclaimer: I am the author)
https://serversforhackers.com/an-ansible-tutorial

The second tutorial for very crucial for my understanding of ansible. I didn’t know nginx at that time so some of the examples at some point didn’t work for me.

All the best

Best Regards,

I found this: https://servercheck.in/blog/running-ansible-within-windows

I also (kind of) solved the problem by setting “ControlManster=no” for ssh in ansible.cfg