Hello, all.
Today, I upgraded Ansible to version 2.2 from version 2.1 via RPM on a CentOS 6.x server. The first playbook I ran post-upgrade contained a play using the win_updates module. It appears the module worked, but I saw the following "Warning" during execution (I could only run the playbook again against a test server that was up-to-date so as to get verbose output) :
Using module file /usr/lib/python2.6/site-packages/ansible/modules/extras/windows/win_updates.ps1
<sawintest02> ESTABLISH WINRM CONNECTION FOR USER: ansible on PORT 5986 TO sawintest02
<sawintest02> EXEC Set-StrictMode -Version Latest
(New-Item -Type Directory -Path $env:temp -Name "ansible-tmp-1480539501.17-123206679591223").FullName | Write-Host -Separator '';
<sawintest02> PUT "/tmp/tmpxodTis" TO "C:\Users\ansible\AppData\Local\Temp\ansible-tmp-1480539501.17-123206679591223\win_updates.ps1"
<sawintest02> EXEC Set-StrictMode -Version Latest
Try
{
& 'C:\Users\ansible\AppData\Local\Temp\ansible-tmp-1480539501.17-123206679591223\win_updates.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
}
[WARNING]: Module invocation had junk after the JSON data:
ok: [sawintest02] => {
"changed": false,
"found_update_count": 0,
"installed_update_count": 0,
"invocation": {
"module_name": "win_updates"
},
"reboot_required": false,
"updates": {}
}
As always, thanks.