You didn't say anything about the auth mechanism used (in Ansible). If 
you're using Kerberos it would be worth testing using Basic creds, as 
Kerberos is very limited when it comes to multi-machine operations.

On Monday, November 9, 2015 at 6:48:33 PM UTC+1, Elliott Barrere wrote:
>
> Hmm, we may be on to something here.  I PSRemote in to the RODC from 
> another RODC and attempted to execute the command (both from a "standard" & 
> admin-priv shell) and it fails similarly (no output to stdout or stderr 
> that I can see).  I see a weird exit code with "Write-Host $LastExitCode" 
> though (it's -1073740940, which never seems to change)
>
> Admittedly, I may be doing things wrong here, but I'm trying to 
> "pre-stage" the account on the RODC with this command, and I don't see a 
> way to do that with Add-Computer.  I'm all ears if you have a way to do it!
>
> On Sunday, November 8, 2015 at 3:35:30 AM UTC-7, Trond Hindenes wrote:
>>
>> The first thing to verify is that the command will run successfully thru 
>> a PSRemoting session. From another computer, issue an "enter-pssession" to 
>> the target computer, using the same authentication type as you do from 
>> Ansible (Basic/Kerberos). Then, execute your command.
>>
>> Not sure why you're not using the Add-Computer cmdlet instead of djoin, 
>> but I guess you have your reasons.
>>
>> On Saturday, November 7, 2015 at 2:35:36 AM UTC+1, Elliott Barrere wrote:
>>>
>>> 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!
>>>
>>

-- 
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/8a4227f8-6e67-4b6a-9fb5-4c690e287496%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to