My case is rather specific, understandably. But if anyone has had issues 
with powershell scripts running over winrm and successfully debugged them, 
any tips/references (either Ansible or winrm related) would be greatly 
appreciated. I'm reading through technet articles and other resources 
learning how to troubleshoot winrm and just about the service as a whole.
 

On Friday, January 23, 2015 at 2:37:56 PM UTC-6, John-Paul Herold wrote:
>
> Hey Brian,
>
> Here is a paste of the errors: http://tny.cz/10fb3baa
>
> Seems like the issue is with how the params are passed to the script over 
> winrm. This leads me to some ambiguity I've had with proper formatting when 
> it comes to Ansible's script module script params (that's a confusing 
> description ha). There are a couple cases where I've had to do things like 
> the following for proper execution (the three examples below, from other 
> tasks, *work*):
>
> # Had to use nested quotes to prevent the colon from path from tampering 
> with how the param was read
> - name: '[29/45] Create Reports_ui web application'
>   script: 'CreateApplication.ps1 Reports_ui "C:\web\path\Reports_ui" 
> Reports_ui Company'
>
> # Example of params that did not need any type of syntax adjustment
> - name: '[28/45] Create Reports app pool'
>   script: CreateAppPool.ps1 Reports_ui True Classic v4.0
>
> # Example of escaping backslash
> - name: '[12/45] Create Company\chp folder'
>   script: CreateFolder.ps1 Company\\chp
>
>
> Most of those were settled on after multiple trials, until a successful 
> execution occurred. This leads me to the script that I opened this 
> discussion about, and the original way in which I call it:
>
> - name: '[37/45] Create AutoImportRoot virtual directory'
>   script: CreateVirtualDirectory.ps1 Company ui AutoImportRoot
>
> So it doesn't have anything too fancy in terms of the params like some of 
> the above examples have. But still, the script isn't running the same over 
> winrm, and exceptions look parameter related. I saw on another thread that 
> setting ANSIBLE_KEEP_REMOTE_FILES=1 would allow me to actually see the 
> script executed on the host?
>
>
>
> On Friday, January 23, 2015 at 2:02:16 PM UTC-6, Brian Coca wrote:
>>
>> without the actual errors, it is hard to help. There are many 
>> differences between local execution from the command line and 
>> executing over winrm, but mostly due to the nature of winrm. 
>>
>>
>>
>>
>>
>> -- 
>> Brian Coca 
>>
>

-- 
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/42ec0ec3-0925-4db8-a0cc-c0b7dd30aadf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to