Usually worth a quick look in the windows event log.

You can also set 

export ANSIBLE_KEEP_REMOTE_FILES=1
before running your playbook.

This will keep the generated .ps1 scripts in the users's temp directory on 
the windows machine.  This is useful as you can then connect to the windows 
machine and run the same script as ansible does.

I suspect you are hitting an issue where you need to provide a credentials 
object when running remotely, which explains why the script runs fine when 
you run on the same machine, but not when you run remotely.

Also, might be worth trying Trond Hindenes' win_package module as it is 
intended for running .msi and .exe installers and can pass username and 
password 
https://github.com/ansible/ansible-modules-extras/pull/713

Hope this helps,

Please let us all know how you get on.

Jon

On Thursday, August 20, 2015 at 7:21:33 PM UTC+1, Michael Legleux wrote:
>
> I have a playbook that simply uses the script module to run a powershell 
> script.
>
> The powershell script merely copies some files then uses "Start-Process" 
> to run a visual studio installer.
> When run with ansible, the install does not work. Looking at the visual 
> studio "logs" is not terribly helpful either as it seems every microsoft 
> error is totally ambiguous (in addition to it creating like 10 log files 
> with cryptic names.)
> If I just run the script locally, everything works just fine.
>
> How can I debug this further? I was under the impression ansible should 
> just copy the script to the machine and run it using the user I have 
> defined for it to use (which is an admin account and the only one on the 
> machine.)
> Where do I go from here?
>

-- 
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/78b81dd7-e374-469b-bd58-54416399dd40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to