Hi there -
I'm trying to get the following domain join script to execute through ansible, but it always fails with error code 1:
C:\windows\system32\djoin.exe /PROVISION /REUSE /DOMAIN **redacted** /MACHINE {{ansible_hostname}} /SAVEFILE c:\{{ansible_hostname}}.txt
The exact same code works fine when I run it from a command prompt on the machine, so I'm very confused why it wouldn't work.
I've tried using raw to execute a script I copied up before, using raw with the script embedded, and also using the script directive.
Here is the error data:
fatal: [vagrant1 -> **redacted**]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"_raw_params": "C:\\windows\\system32\\djoin.exe /PROVISION /REUSE /DOMAIN **redacted** /MACHINE VAGRANT-2012-R2 /SAVEFILE c:\\VAGRANT-2012-R2.txt"}, "module_name": "raw"}, "rc": 1, "stderr": "", "stdout": "", "stdout_lines": []}
Any thoughts on how to debug this? I can execute other commands via "raw", and this command works just fine (even running the script ansible copied up directly).
Thanks in advance!