Thank you for the example.
I'm testing win_package to remove Silverlight and after 15 minutes of
waiting Ansible has not returned.
Here is the task I'm using.
- name: remove packages (win_package)
win_package: >
name="Microsoft Silverlight"
path="C:\\Program Files\\Microsoft Silverlight\\sllauncher.exe"
product_id="{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}"
state="absent"
Here is the relevant (-vvvv) output
TASK [windows-workstations : remove packages (win_package)]
********************
task path:
/Users/tanner/projects/ansible.git/playbooks.git/roles/windows-workstations/tasks/main.yml:86
Using module file
/Users/tanner/projects/ansible.git/ansible/lib/ansible/modules/extras/windows/win_package.ps1
<10.X.X.X> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986
TO 10.X.X.X
<10.X.X.X> EXEC Set-StrictMode -Version Latest
(New-Item -Type Directory -Path $env:temp -Name
"ansible-tmp-1465501508.58-107879928529086").FullName | Write-Host
-Separator '';
<10.X.X.X> PUT "/var/folders/y_/w_pbl7355vg3gv5xkmsld49m0000gn/T/tmpHf7TfN"
TO
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1465501508.58-107879928529086\win_package.ps1"
<10.X.X.X> EXEC Set-StrictMode -Version Latest
Try
{
&
'C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1465501508.58-107879928529086\win_package.ps1'
}
Catch
{
$_obj = @{ failed = $true }
If ($_.Exception.GetType)
{
$_obj.Add('msg', $_.Exception.Message)
}
Else
{
$_obj.Add('msg', $_.ToString())
}
If ($_.InvocationInfo.PositionMessage)
{
$_obj.Add('exception', $_.InvocationInfo.PositionMessage)
}
ElseIf ($_.ScriptStackTrace)
{
$_obj.Add('exception', $_.ScriptStackTrace)
}
Try
{
$_obj.Add('error_record', ($_ | ConvertTo-Json | ConvertFrom-Json))
}
Catch
{
}
Echo $_obj | ConvertTo-Json -Compress -Depth 99
Exit 1
}
Finally { Remove-Item
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1465501508.58-107879928529086"
-Force -Recurse -ErrorAction SilentlyContinue }
What can I do to troubleshoot this further?
--
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/c1d098ab-9066-4c12-9319-3eb8bf4c7b4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.