Jon,
Don't think that's it. Did my best to check rights and permissions, it
appears that all files can be accessed and variables are being read. See
the below output (with some data removed). You can see connecting via
winrm, sending powershell script, and then attempting to run powershell
script using python.
Using /etc/ansible/ansible.cfg as config file
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/
python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: playbook.yml
*********************************************************
1 plays in playbook.yml
PLAY [windows]
*****************************************************************
TASK [setup]
*******************************************************************
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/
core/system/setup.py
<x.x.x.x> ESTABLISH WINRM CONNECTION FOR USER: username@domain on PORT 5986
TO x.x.x.x
<x.x.x.x> WINRM CONNECT: transport=kerberos endpoint=https:
//x.x.x.x:5986/wsman
<x.x.x.x> WINRM OPEN SHELL: SOME_GUID
<x.x.x.x> EXEC Set-StrictMode -Version Latest
(New-Item -Type Directory -Path $env:temp -Name
"ansible-tmp-1485267403.25-69902647291132").FullName | Write-Host -Separator
'';
<x.x.x.x> WINRM EXEC u'PowerShell' [u'-NoProfile', u'-NonInteractive', u
'-ExecutionPolicy', u'Unrestricted', u'-EncodedCommand',COMMAND_REMOVED]
<x.x.x.x> WINRM RESULT u'<Response code 0, out "C:\\Users\\shortusername",
err "#< CLIXML\r\n<Objs Ver">'
<x.x.x.x> PUT "/tmp/tmpKGSDMo" TO
"C:\Users\username\AppData\Local\Temp\ansible-tmp-1485267403.25-69902647291132\setup.ps1"
<x.x.x.x> WINRM PUT "/tmp/tmpKGSDMo" to
"C:\Users\username\AppData\Local\Temp\ansible-tmp-1485267403.25-69902647291132\setup.ps1"
(offset=95257 size=95257)
<x.x.x.x> EXEC Set-StrictMode -Version Latest
Try
{
/usr/bin/python
'C:\Users\username\AppData\Local\Temp\ansible-tmp-1485267403.25-69902647291132\setup.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
}
On Monday, January 23, 2017 at 2:30:26 PM UTC-5, J Hawkesworth wrote:
>
> So it sounds like for some reason it isn't picking up your group cars that
> are used to tell ansible to connect via pywinrm.
>
> Make sure you are running from the same working directory as you were on
> Friday, just to be sure that the same paths apply.
>
> Try running with -vvvvvv as well. I can't now recall if this will print
> out the paths it is using to determine where your inventory and group vars
> are, but worth a look.
>
> That said my WSL is being strange today and not resolving hosts it has in
> the past, so it is possible there is something in recent windows updates
> that is tripping you up too.
>
> Hope this is of some help,
>
> Jon
>
>
--
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/d988e4fb-0254-4da2-b002-82717e78fe9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.