I can't see anything in the event logs that looks promising. I'm not too keen on powershell yet. When you say "run the same script as ansible does" I'm not even sure how I would emulate that.
I tried remoting in and running the script left in the temp directory and it ran just fine, I have a feeling that's not quite the same process though. On Friday, August 21, 2015 at 6:03:55 AM UTC-7, J Hawkesworth wrote: > > 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/c802f04f-1e6c-4fc7-8dc1-2fc56d6253d0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
