Usually when I've seen that error, it's because Powershell is not on the 
system path (ie, C:\Windows\System32\WindowsPowerShell\v1.0). Unfortunately 
the error message comes from a much higher level (a failure creating the 
tempdir), so the error message isn't specific to failures that might occur 
on Windows (hence the somewhat misleading text). 

On Thursday, October 13, 2016 at 8:10:33 AM UTC-7, arnabs...@gmail.com 
wrote:
>
>
> Hi
>
> When run this ansible command " ansible windows  -m win_ping"  I am  
> getting the below error , please can anyone help to fix this issue
>
> 10.51.239.192 | UNREACHABLE! => {
>     "changed": false,
>     "msg": "Authentication or permission failure. In some cases, you may 
> have been able to authenticate and did not have permissions on the remote 
> directory. Consider changing the remote temp path in ansible.cfg to a path 
> rooted in \"/tmp\". Failed command was: PowerShell -NoProfile 
> -NonInteractive -ExecutionPolicy Unrestricted -EncodedCommand 
> UwBlAHQALQBTAHQAcgBpAGMAdABNAG8AZABlACAALQBWAGUAcgBzAGkAbwBuACAATABhAHQAZQBzAHQACgAoAE4AZQB3AC0ASQB0AGUAbQAgAC0AVAB5AHAAZQAgAEQAaQByAGUAYwB0AG8AcgB5ACAALQBQAGEAdABoACAAJABlAG4AdgA6AHQAZQBtAHAAIAAtAE4AYQBtAGUAIAAiAGEAbgBzAGkAYgBsAGUALQB0AG0AcAAtADEANAA3ADYAMwA2ADYANgAwADEALgA1ADgALQAyADAANwA1ADgANgA1ADMANAA4ADQANgA3ADEAMgAiACkALgBGAHUAbABsAE4AYQBtAGUAIAB8ACAAVwByAGkAdABlAC0ASABvAHMAdAAgAC0AUwBlAHAAYQByAGEAdABvAHIAIAAnACcAOwA=,
>  
> exited with result 1",
>     "unreachable": true
> }
>
> I am trying to connect to windows (windows 2012 R2) host ip  10.51.239.192
>
> I have created a windows.yml  under /etc/ansible/group_vars  , below is 
> the connect of the yml file , in my inventory file I have added the ip of 
> this windows host 10.51.239.192
>
> ansible_user: Administrator
> ansible_password: P@ssw0rd
> ansible_port: 5986
> ansible_connection: winrm
> # The following is necessary for Python 2.7.9+ when using default WinRM 
> self-signed certificates:
> ansible_winrm_server_cert_validation: ignore
> #ansible_winrm_transport: ssl
>
> using this same setting I am able to ping to another windows machine which 
> is also windows server 2012
>
> Thanks
> Arnab Chowdhury
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/23d9b691-9c3c-4f7b-9d98-497fac51ac6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to