[ansible-project] Re: WinRM timeout for VMWare Tools Install

2016-08-08 Thread Matt Betts
Unfortunately the only switches I could find with VMWare tools was to 
exclude modules entirely, not to postpone a delayed install until reboot. 
I'm just going to keep VMware tools on my templates along with the Windows 
Update until the async feature becomes available for Windows.

Regards,

Matt

On Monday, August 1, 2016 at 4:06:48 PM UTC-4, Matt Davis wrote:
>
> Ansible 2.2 is scheduled to ship with async support for Windows (I'm 
> putting the finishing touches on it now), which would be the right solution 
> to this if you're unable to otherwise defer the NIC bounce. 
>
> -Matt
>
> On Friday, July 29, 2016 at 4:10:03 PM UTC-7, Matt Betts wrote:
>>
>> I've got a basic task to install VMWare tools on a Windows VM and when it 
>> installs it looks to cause a temporary network disconnection whilst it 
>> updates the NIC drivers. During this time WinRM looks to be timing out and 
>> throwing an error. VMWare tools is successfully installing though. Is 
>> anyone else using Ansible to install VMWare tools on Windows?
>>
>> Traceback (most recent call last):
>>   File 
>> "/usr/lib/python2.7/site-packages/ansible-2.2.0-py2.7.egg/ansible/plugins/connection/winrm.py",
>>  
>> line 270, in exec_command
>> result = self._winrm_exec(cmd_parts[0], cmd_parts[1:], from_exec=True)
>>   File 
>> "/usr/lib/python2.7/site-packages/ansible-2.2.0-py2.7.egg/ansible/plugins/connection/winrm.py",
>>  
>> line 215, in _winrm_exec
>> response = Response(self.protocol.get_command_output(self.shell_id, 
>> command_id))
>>   File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 333, in 
>> get_command_output
>> self._raw_get_command_output(shell_id, command_id)
>>   File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 352, in 
>> _raw_get_command_output
>> res = self.send_message(xmltodict.unparse(req))
>>   File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 207, in 
>> send_message
>> return self.transport.send_message(message)
>>   File "/usr/lib/python2.7/site-packages/winrm/transport.py", line 173, 
>> in send_message
>> response = self.session.send(prepared_request, 
>> timeout=self.read_timeout_sec)
>>   File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 585, 
>> in send
>> r = adapter.send(request, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 479, 
>> in send
>> raise ReadTimeout(e, request=request)
>> ReadTimeout: HTTPSConnectionPool(host='LABSTC2WINVT675.labs.corp', 
>> port=5986): Read timed out. (read timeout=30)
>> fatal: [LABSTC2WINVT675.labs.corp]: UNREACHABLE! => {"changed": false, 
>> "msg": "failed to exec cmd PowerShell -NoProfile -NonInteractive 
>> -ExecutionPolicy Unrestricted -EncodedCommand 
>> UwBlAHQALQBTAHQAcgBpAGMAdABNAG8AZABlACAALQBWAGUAcgBzAGkAbwBuACAATABhAHQAZQBzAHQACgBUAHIAeQAKAHsACgAmACAAJwBDADoAXABVAHMAZQByAHMAXABhAF8AdQBzAGUAcgBcAEEAcABwAEQAYQB0AGEAXABMAG8AYwBhAGwAXABUAGUAbQBwAFwAYQBuAHMAaQBiAGwAZQAtAHQAbQBwAC0AMQA0ADYAOQA4ADMAMwA1ADQANAAuADAAMQAtADIANgA0ADEANAA4ADEAOQAwADQAOAAzADIAOABcAHcAaQBuAF8AcABhAGMAawBhAGcAZQAuAHAAcwAxACcACgB9AAoAQwBhAHQAYwBoAAoAewAKACQAXwBvAGIAagAgAD0AIABAAHsAIABmAGEAaQBsAGUAZAAgAD0AIAAkAHQAcgB1AGUAIAB9AAoASQBmACAAKAAkAF8ALgBFAHgAYwBlAHAAdABpAG8AbgAuAEcAZQB0AFQAeQBwAGUAKQAKAHsACgAkAF8AbwBiAGoALgBBAGQAZAAoACcAbQBzAGcAJwAsACAAJABfAC4ARQB4AGMAZQBwAHQAaQBvAG4ALgBNAGUAcwBzAGEAZwBlACkACgB9AAoARQBsAHMAZQAKAHsACgAkAF8AbwBiAGoALgBBAGQAZAAoACcAbQBzAGcAJwAsACAAJABfAC4AVABvAFMAdAByAGkAbgBnACgAKQApAAoAfQAKAEkAZgAgACgAJABfAC4ASQBuAHYAbwBjAGEAdABpAG8AbgBJAG4AZgBvAC4AUABvAHMAaQB0AGkAbwBuAE0AZQBzAHMAYQBnAGUAKQAKAHsACgAkAF8AbwBiAGoALgBBAGQAZAAoACcAZQB4AGMAZQBwAHQAaQBvAG4AJwAsACAAJABfAC4ASQBuAHYAbwBjAGEAdABpAG8AbgBJAG4AZgBvAC4AUABvAHMAaQB0AGkAbwBuAE0AZQBzAHMAYQBnAGUAKQAKAH0ACgBFAGwAcwBlAEkAZgAgACgAJABfAC4AUwBjAHIAaQBwAHQAUwB0AGEAYwBrAFQAcgBhAGMAZQApAAoAewAKACQAXwBvAGIAagAuAEEAZABkACgAJwBlAHgAYwBlAHAAdABpAG8AbgAnACwAIAAkAF8ALgBTAGMAcgBpAHAAdABTAHQAYQBjAGsAVAByAGEAYwBlACkACgB9AAoAVAByAHkACgB7AAoAJABfAG8AYgBqAC4AQQBkAGQAKAAnAGUAcgByAG8AcgBfAHIAZQBjAG8AcgBkACcALAAgACgAJABfACAAfAAgAEMAbwBuAHYAZQByAHQAVABvAC0ASgBzAG8AbgAgAHwAIABDAG8AbgB2AGUAcgB0AEYAcgBvAG0ALQBKAHMAbwBuACkAKQAKAH0ACgBDAGEAdABjAGgACgB7AAoAfQAKAEUAYwBoAG8AIAAkAF8AbwBiAGoAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAALQBDAG8AbQBwAHIAZQBzAHMAIAAtAEQAZQBwAHQAaAAgADkAOQAKAEUAeABpAHQAIAAxAAoAfQAKAEYAaQBuAGEAbABsAHkAIAB7ACAAUgBlAG0AbwB2AGUALQBJAHQAZQBtACAAIgBDADoAXABVAHMAZQByAHMAXABhAF8AdQBzAGUAcgBcAEEAcABwAEQAYQB0AGEAXABMAG8AYwBhAGwAXABUAGUAbQBwAFwAYQBuAHMAaQBiAGwAZQAtAHQAbQBwAC0AMQA0ADYAOQA4ADMAMwA1ADQANAAuADAAMQAtADIANgA0AD

[ansible-project] WinRM timeout for VMWare Tools Install

2016-07-29 Thread Matt Betts
I've got a basic task to install VMWare tools on a Windows VM and when it 
installs it looks to cause a temporary network disconnection whilst it 
updates the NIC drivers. During this time WinRM looks to be timing out and 
throwing an error. VMWare tools is successfully installing though. Is 
anyone else using Ansible to install VMWare tools on Windows?

Traceback (most recent call last):
  File 
"/usr/lib/python2.7/site-packages/ansible-2.2.0-py2.7.egg/ansible/plugins/connection/winrm.py",
 
line 270, in exec_command
result = self._winrm_exec(cmd_parts[0], cmd_parts[1:], from_exec=True)
  File 
"/usr/lib/python2.7/site-packages/ansible-2.2.0-py2.7.egg/ansible/plugins/connection/winrm.py",
 
line 215, in _winrm_exec
response = Response(self.protocol.get_command_output(self.shell_id, 
command_id))
  File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 333, in 
get_command_output
self._raw_get_command_output(shell_id, command_id)
  File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 352, in 
_raw_get_command_output
res = self.send_message(xmltodict.unparse(req))
  File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 207, in 
send_message
return self.transport.send_message(message)
  File "/usr/lib/python2.7/site-packages/winrm/transport.py", line 173, in 
send_message
response = self.session.send(prepared_request, 
timeout=self.read_timeout_sec)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 585, 
in send
r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 479, 
in send
raise ReadTimeout(e, request=request)
ReadTimeout: HTTPSConnectionPool(host='LABSTC2WINVT675.labs.corp', 
port=5986): Read timed out. (read timeout=30)
fatal: [LABSTC2WINVT675.labs.corp]: UNREACHABLE! => {"changed": false, 
"msg": "failed to exec cmd PowerShell -NoProfile -NonInteractive 
-ExecutionPolicy Unrestricted -EncodedCommand 
UwBlAHQALQBTAHQAcgBpAGMAdABNAG8AZABlACAALQBWAGUAcgBzAGkAbwBuACAATABhAHQAZQBzAHQACgBUAHIAeQAKAHsACgAmACAAJwBDADoAXABVAHMAZQByAHMAXABhAF8AdQBzAGUAcgBcAEEAcABwAEQAYQB0AGEAXABMAG8AYwB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GUAcgByAG8AcgBfAHIAZQBjAG8AcgBkACcALAAgACgAJABfACAAfAAgAEMAbwBuAHYAZQByAHQAVABvAC0ASgBzAG8AbgAgAHwAIABDAG8AbgB2AGUAcgB0AEYAcgBvAG0ALQBKAHMAbwBuACkAKQAKAH0ACgBDAGEAdABjAGgACgB7AAoAfQAKAEUAYwBoAG8AIAAkAF8AbwBiAGoAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuACAALQBDAG8AbQBwAHIAZQBzAHMAIAAtAEQAZQBwAHQAaAAgADkAOQAKAEUAeABpAHQAIAAxAAoAfQAKAEYAaQBuAGEAbABsAHkAIAB7ACAAUgBlAG0AbwB2AGUALQBJAHQAZQBtACAAIgBDADoAXABVAHMAZQByAHMAXABhAF8AdQBzAGUAcgBcAEEAcABwAEQAYQB0AGEAXABMAG8AYwBhAGwAXABUAGUAbQBwAFwAYQBuAHMAaQBiAGwAZQAtAHQAbQBwAC0AMQA0ADYAOQA4ADMAMwA1ADQANAAuADAAMQAtADIANgA0ADEANAA4ADEAOQAwADQAOAAzADIAOAAiACAALQBGAG8AcgBjAGUAIAAtAFIAZQBjAHUAcgBzAGUAIAAtAEUAcgByAG8AcgBBAGMAdABpAG8AbgAgAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIAB9AA==",
 
"unreachable": true}

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5b75d5ed-ffa7-4031-b656-811d88127333%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Using win_regedit to harden Windows server ciphers

2016-07-11 Thread Matt Betts
Hi, I'm trying to create a playbook that I can use to bring a windows 
server up to the latest secure hardening standards and I'm stuck with 
configuring Ciphers. An example is as follows:

 ansible {HOST} -m win_regedit -a 
"key='HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2
 
128/128' value=Enabled data= datatype=dword state=present" -vvv

As you can see the Key name is "RC2 128/128" and the issue I'm encountering 
is Powershell interprets the / as a new key, irrespective of the direction. 

Has anyone managed to create a playbook to do this? I've got some 
alternatives (merging a registry file etc) but they aren't as clean. From 
the research I've done it looks like i'm going to need to user the 
powershell CreateSubKey function.

Thanks,


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/86819205-740e-4abd-889c-6f1bb5c0bf4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.