Your windows.yml should be in a "group_vars" subdirectory for ansible to
pick up those variables.

Alternately, for a few simple variables, you can add those directly to your
hosts file:

[windows]
ComputerName

[windows:vars]
ansible_ssh_user=ansible
ansible_ssh_pass=ansible123
ansible_ssh_port=5986
ansible_connection=winrm


On Thu, Apr 2, 2015 at 1:31 PM, skinnedknuckles <
[email protected]> wrote:

> I'm having trouble getting win_ping to work with or without SSL.  Here are
> my details...
>
>
> CentOS Linux release 7.1.1503 (Core)
>
> ansible 1.8 (devel 57d2622c8c) last updated 2014/10/17 18:19:13 (GMT -500)
>
>
> using pywinrm-0.0.3-py2.7
>
>
> I started winrm on the remote node using this script from Hindenes/Church
> <https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1>
>
>
> windows.yml file contains...
>
>
>  ansible_ssh_user: ansible
>
> ansivle_ssh_pass: ansible123
>
> ansible_ssh_port: 5986
>
> ansible_connection: winrm
>
>
>
> hosts file contains...
>
> [windows]
> ComputerName
>
>
>
>
> This is my output when trying to run win_ping
>
> [ansmgr@dhcp1-60-20 ansible]$ ansible windows -m win_ping -vvvv
>
> <www.example.com <http://ads-6999.am.ad.seagate.com>> ESTABLISH
> CONNECTION FOR USER: ansmgr
>
> <www.example.com <http://ads-6999.am.ad.seagate.com>> REMOTE_MODULE
> win_ping
>
> <www.example.com <http://ads-6999.am.ad.seagate.com>> EXEC ssh -C -tt
> -vvv -o ControlMaster=auto -o ControlPersist=60s -o
> ControlPath=/home/ansmgr/.ansible/cp/ansible-ssh-%h-%p-%r -o
> KbdInteractiveAuthentication=no -o PreferredAuthentications=
> gssapi-with-mic,gssapi-keyex,hostbased,publickey -o
> PasswordAuthentication=no -o ConnectTimeout=10 www.example.com
> <http://ads-6999.am.ad.seagate.com> /bin/sh -c 'mkdir -p
> $HOME/.ansible/tmp/ansible-tmp-1427994666.99-36837830948182 && chmod a+rx
> $HOME/.ansible/tmp/ansible-tmp-1427994666.99-36837830948182 && echo
> $HOME/.ansible/tmp/ansible-tmp-1427994666.99-36837830948182'
>
> www.example.com <http://ads-6999.am.ad.seagate.com> | FAILED => SSH
> encountered an unknown error. The output was:
>
> OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
>
> debug1: Reading configuration data /etc/ssh/ssh_config
>
> debug1: /etc/ssh/ssh_config line 56: Applying options for *
>
> debug1: auto-mux: Trying existing master
>
> debug1: Control socket 
> "/home/ansmgr/.ansible/cp/ansible-ssh-www.example.com-22-ansmgr"
> does not exist
>
> debug2: ssh_connect: needpriv 0
>
> debug1: Connecting to www.example.com <http://ads-6999.am.ad.seagate.com>
> [123.123.123.123] port 22.
>
> debug2: fd 3 setting O_NONBLOCK
>
> debug1: connect to address 123.123.123.123 port 22: Connection refused
>
> ssh: connect to host www.example.com <http://ads-6999.am.ad.seagate.com>
> port 22: Connection refused
>
>
>
> --
> 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/e6fb0ae9-100d-4ad5-aec1-8f48ed7e664d%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/e6fb0ae9-100d-4ad5-aec1-8f48ed7e664d%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/CAH%2BKTJ7QUH4WTSQUpDHSfsiS4sOkKmHTp3HP05WY6pCdJ6A%3D7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to