It looks like it is trying user root to connect to your windows machine.

I use a local user to connect to my windows systems.  I have a setup 
systems named veeam in my hosts file.  I then setup 
/etc/ansible/group_vars/veeam.yml.  In this file I have:

ansible_user: localuser
ansible_password: localuserspassword
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore

Then I would run.
ansible veeam -m setup -vvv

and it will automatically use the group_vars/veeam.yml settings to access 
my veeam windows hosts.

You can see the example in the link you entered 
above: http://docs.ansible.com/ansible/intro_windows.html#inventory  see 
the "In group_vars..." section.


On Wednesday, April 13, 2016 at 8:06:01 AM UTC-5, Benjamin Loehner wrote:
>
> Hi,
>
> i followed the instructions at 
> http://docs.ansible.com/ansible/intro_windows.html to set up a control 
> machine but it won't work. I the set up a second machine, following these 
> instructions 
> http://darrylcauldwell.com/how-to-setup-an-ansible-test-lab-for-windows-managed-nodes-custom-windows-modules/
> .
>
> The funny thing is, both react the same way:
>
> root@XX-WEB01:~# ansible all -m setup -vvv
> <xxx.xxx.xxx.xxx> ESTABLISH WINRM CONNECTION FOR USER: root on PORT 5986 
> TO xxx.xxx.xxx.xxx
> xxx.xxx.xxx.xxx | FAILED => Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 
> 561, in _executor
>     exec_rc = self._executor_internal(host, new_stdin)
>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 
> 666, in _executor_internal
>     return self._executor_internal_inner(host, self.module_name, 
> self.module_args, inject, port, complex_args=complex_args)
>   File "/usr/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 
> 837, in _executor_internal_inner
>     conn = self.connector.connect(actual_host, actual_port, actual_user, 
> actual_pass, actual_transport, actual_private_key_file)
>   File "/usr/lib/python2.7/dist-packages/ansible/runner/connection.py", 
> line 34, in connect
>     self.active = conn.connect()
>   File 
> "/usr/lib/python2.7/dist-packages/ansible/runner/connection_plugins/winrm.py",
>  
> line 132, in connect
>     self.protocol = self._winrm_connect()
>   File 
> "/usr/lib/python2.7/dist-packages/ansible/runner/connection_plugins/winrm.py",
>  
> line 71, in _winrm_connect
>     cache_key = '%s:%s@%s:%d' % (self.user, 
> hashlib.md5(self.password).hexdigest(), self.host, port)
> TypeError: must be string or buffer, not None
>
> Both machines are running Debian (3.16.0-4-amd64 #1 SMP Debian 
> 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux), the target is a 2012R2. To 
> be honest, i'm a linux newbie and i didn't understand
> everything in the manuals.
>

-- 
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/db178a7f-1639-4017-b638-dd3e07abf3d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to