Hello,
I am running powershell script using script module on ansible core 2.3.1.0. But it works on older version ansible core 2.2. Is this a bug in ansible 2.3 and higher version, any fixes or any workarounds would be appreciated.
=============================================
- hosts: win
gather_facts: no
tasks:
- script: files/crtObjGp.ps1 {{vm_name}}
tags: crtObj
===============================================
ansible-playbook -i inventory win.yml --tags crtObj --extra-var "vm_name=coretest"
PLAY [win] **********************************************************************************************************************************************************
TASK [script] *******************************************************************************************************************************************************
fatal: [mawx0001.swift.corp]: 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 UwBlAHQALQBTAHQAcgBpAGMAdABNAG8AZABlACAALQBWAGUAcgBzAGkAbwBuACAATABhAHQAZQBzAHQACgAoAE4AZQB3AC0ASQB0AGUAbQAgAC0AVAB5AHAAZQAgAEQAaQByAGUAYwB0AG8AcgB5ACAALQBQAGEAdABoACAAJABlAG4AdgA6AHQAZQBtAHAAIAAtAE4AYQBtAGUAIAAiAGEAbgBzAGkAYgBsAGUALQB0AG0AcAAtADEANQAxADgANwAyADkAMgA5ADQALgAwADUALQAyADQANAA3ADMANgA3ADkANwAxADgAMwA5ADgAMwAiACkALgBGAHUAbABsAE4AYQBtAGUAIAB8ACAAVwByAGkAdABlAC0ASABvAHMAdAAgAC0AUwBlAHAAYQByAGEAdABvAHIAIAAnACcAOwAKAEkAZgAgACgALQBuAG8AdAAgACQAPwApACAAewAgAEkAZgAgACgARwBlAHQALQBWAGEAcgBpAGEAYgBsAGUAIABMAEEAUwBUAEUAWABJAFQAQwBPAEQARQAgAC0ARQByAHIAbwByAEEAYwB0AGkAbwBuACAAUwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQApACAAewAgAGUAeABpAHQAIAAkAEwAQQBTAFQARQBYAEkAVABDAE8ARABFACAAfQAgAEUAbABzAGUAIAB7ACAAZQB4AGkAdAAgADEAIAB9ACAAfQA=, exited with result 1: C:\\Users\\sadm_athangal\\AppData\\Local\\Temp\\ansible-tmp-1518729294.05-244736797183983\r\n", "unreachable": true}
to retry, use: --limit @/home/athangal/playbooks/AdIntRhel.retry
PLAY RECAP **********************************************************************************************************************************************************
mawx0001.swift.corp : ok=0 changed=0 unreachable=1 failed=0
=========================================================
[win]
windowvm.abc.corp
[win:vars]
ansible_ssh_user=winrm
ansible_ssh_user=user1
ansible_ssh_pass=
ansible_ssh_port=5986
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
ansible_winrm_transport=kerberos
ansible_winrm_kerberos_delegation=true