You said you're getting a connection refused, so check the firewall and winrm settings on the Windows machine.
There's an example script ( https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1) that takes care of WinRM making sure the box allows remote powershell exec, among other things. Likely you're missing a step preparing the Windows machine to accept remote winrm connections. On Thu, Aug 21, 2014 at 1:29 PM, Avinash Singh <[email protected]> wrote: > Hi, > > I have installed ansible on my linux controller, however I am unable to > win_ping my windows host machine. > The controller and host are virtual machines hosted on my physical machine. > > I am able to ping each machine in both directions from cmd prompt and the > terminal, to verify that the machines can see each other. > > I have followed all the steps from here : > http://docs.ansible.com/intro_windows.html > > When running the command below I get a connection refused. > > ansible windows -i /etc/anisible/hosts -m win_ping --ask-vault-pass -vvvv > > I have also tried using a playbook. However I get some cows :) and > connection could be established. > > ansible-playbook site.yml > > with the following site.xml contents: > --- > -host: windows > remote_user: Administrator > vars: > > > ansible_ssh_user: Administrator > ansible_ssh_pass: test > ansible_ssh_port: 5986 > ansible_connection: winrm > > tasks: > - action: win_ping > > Is there something that I am missing? > > -- > 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/3f8137c9-082d-4591-be0f-9889847b78b5%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/3f8137c9-082d-4591-be0f-9889847b78b5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAK6JQEEUC65AgRi%2Biss1XEK2noGzBxO7Lsi7LZ6L3rT6pSp9_w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
