ansible uses winrm and you dont get full permission in the remote session.
try "invoke-command" with explicit credentials 

eg 

$Username = 'admin'

$Password = 'password'

$pass = ConvertTo-SecureString -AsPlainText $Password -Force$Cred = New-Object 
System.Management.Automation.PSCredential -ArgumentList $Username,$pass

Invoke-command –computername . -credential $cred –scriptblock {rdsinstall.exe}






On Thursday, 9 June 2016 06:36:18 UTC+10, Justin Dugan wrote:
>
> I am trying to install software on some windows machines using ansible. I 
> have tried raw and win_package to do this. Both of them result in a 1603 
> error from windows. The same command run fine when logged into the machine 
> using RDP using the same user account. 
>
> - name: install RDE
>   raw: "c:\\Temp\\RDEInstall.exe /passive SILENT_INSTALL=true'"
>   register: raw_output
> - debug: var=raw_output.stdout
> - debug: var=raw_output.stderr
>
>
> This produces the following output:
>
> TASK [RDE : install RDE] 
> *******************************************************
> ok: [installtest]
>
> TASK [RDE : debug] 
> *************************************************************
> ok: [installtest] => {
>     "raw_output.stdout": ""
> }
>
> TASK [RDE : debug] 
> *************************************************************
> ok: [installtest] => {
>     "raw_output.stderr": ""
> }
>
>
> The Windows application log shows a return code of 1603 for event 1033 for 
> this install. As stated before, if the raw command is executed on the 
> machine (e.g. powershell window) via RDP, it installs fine. This leads me 
> to believe the installer is missing access to something when it's executed 
> via ansible that it has when executed on the machine. 
>
> Any help would be appreciated.
>
> Thanks!
>

-- 
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/08eeb71b-57b8-4260-afdd-1766d0ad7ded%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to