Hello,

I have just started to use Ansible to complete some automation aspects on 
the Windows platform.  My first task was to run our power shell script to 
install out Anti Virus software.

I was able to achieve this by creating a bat file that calls the power 
shell script with psexec.  The bat file runs with elevated privileges 
allowing the script to work.  The Ansible playbook completes with a psexec 
error and says the playbook fails.  But when I look at the machine this 
script completes successfully.  Below is the error I receive:


fatal:
[IP]: FAILED! => {"changed": true, "delta":
"0:00:00.749984", "end": "2017-12-11
07:32:08.172137", "failed": true, "psexec_command":
"c:\\PSTools\\psexec.exe -accepteula psexec -u administrator -p force -s
-d cmd.exe /c \"C:\\ansible\\av\\av-use.bat\"", "rc":
1412, "start": "2017-12-11 07:32:07.422153",
"stderr": "psexec exited with error code 1412.\r\n",
"stderr_lines": ["psexec exited with error code 1412."],
"stdout": "\r\nPsExec v2.2 - Execute processes
remotely\r\nCopyright (C) 2001-2016 Mark Russinovich\r\nSysinternals -
www.sysinternals.com\r\n\r\n", "stdout_lines": ["",
"PsExec v2.2 - Execute processes remotely", "Copyright (C)
2001-2016 Mark Russinovich", "Sysinternals - www.sysinternals.com",
""]}

 
I have also received the same sort of error with the Amazon SSM script as 
well.  This script completes too.

Does anyone have any insight on this false negative?  I am trying to chain 
several things together in my playbook, but once this script fails, the 
playbook stops.  


Thank you in advance!

Josh

-- 
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/fc275bc7-4605-4509-89b3-ae0716716b17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to