Problems getting started

95 views
Skip to first unread message

Stephan Hradek

unread,
Aug 27, 2015, 7:24:01 AM8/27/15
to Ansible Project
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 :(

<myhost> ESTABLISH CONNECTION FOR USER: linuxme
<myhost> REMOTE_MODULE ping
<myhost> 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.



Willard Dennis

unread,
Aug 27, 2015, 8:23:29 AM8/27/15
to Ansible Project
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

Joseph Djomeda

unread,
Aug 27, 2015, 9:26:41 AM8/27/15
to Ansible Project
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,


--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a5f6fbc9-e5a4-45dd-ac26-4d6ae269ec23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves........

Stephan Hradek

unread,
Aug 27, 2015, 10:09:44 AM8/27/15
to Ansible Project


Am Donnerstag, 27. August 2015 14:23:29 UTC+2 schrieb Willard Dennis:
May be wrong at this point, but I don't think Ansible supports being run on Windiws/Cygwin...

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
 
Reply all
Reply to author
Forward
0 new messages