Hi, Could be a few things going on here but 'Name or service not known' can mean that it can't find the host.
Can you ping *123.123.123.123.mycompany.com <http://123.123.123.123.mycompany.com/> *from your ansible controller? Also if you do an nslookup on its ip address, do you get the correct hostname back? Did you run the https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 script on the Windows 7 machine. Also, if I recall, Windows 7 came with Powershell 2.0. You'll need to upgrade it to at least Powershell / Windows Management Framework 3.0 (although I would go straight to 4.0 if possible). Hope this helps, Jon On Monday, April 25, 2016 at 7:06:21 PM UTC+1, skinnedknuckles wrote: > > Centos 7 > Ansible 2.1 > Windows 7 on remote node > > My inventory file (/etc/ansible/hosts) contains... > [windows] > 123.123.123.123.mycompany.com > > My /etc/ansible/group_vars/windows.yml file contains... > > ansible_user: username > ansible_password: password > ansible_port: 5985 > ansible_connection: winrm > ansible_winrm_server_cert_validation: ignore > > > But when I try to run win_ping I get this: > > > *$ansible windows -m win_ping -c winrm --vvv* > > *No config file found; using defaults* > > *<123.123.123.123.mycompany.com <http://123.123.123.123.mycompany.com>> > ESTABLISH WINRM CONNECTION FOR USER: username on port 5985 TO > 123.123.123.123.mycompany.com <http://123.123.123.123.mycompany.com>* > > *123.123.123.123.mycompany.com <http://123.123.123.123.mycompany.com> | > FAILED! => {* > > * "failed": true.* > > * "msg": "plaintext: 500 WinRMTransport. [Errno -2] Name or service not > known"* > > *}* > > > What config file am I missing? > > Where should it be located? > > What should it contain? > > > Any suggestions are appreciated. > > > Jonathan > > -- 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/771a6a73-3f3f-4554-aaaa-cdae3eeb9b80%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
