I tried using the wrong password on purpose. But that had no affect, and 
the problem was reproducible.  I tried changing the port to 5984.  This 
produced a different error.  The time it takes before failing is longest 
when I use port 5986.  So I think I should use port 5986.

Where do I create the directory groups_var?  I want to put windows.yml in 
there.  I have in my /etc/ansible/hosts file certain entries like 
ansible_ssh_user, ansible_ssh_password, etc.  Ansible's documentation 
recommends that these entries go into a windows.yml file in a groups_var 
directory.  I don't know how my playbooks or my inventory file 
(/etc/ansible/hosts) would refer to this windows.yml file.  I wouldn't 
expect it to be magically invoked when I run a playbook.  I tried using 
Ansible's recommended "field:" format.  But this produced errors.  I have 
better luck when I assign ansible_ssh_user, ansible_ssh_password etc. with 
"=" equals signs in my /etc/ansible/hosts file.  The colon separator didn't 
help me.

On Monday, February 1, 2016 at 9:40:52 AM UTC-5, J Hawkesworth wrote:
>
> Hello,
>
> No you don't need to use kerberos to control a windows machine, unless you 
> are trying to use a domain user to connect.
>
> To start with I suggest you set things up as described here - 
> http://docs.ansible.com/ansible/intro_windows.html#inventory
>
> with a windows group in your inventory and the group vars needed to 
> connect to windows set up.
>
> It looks at the moment like you are still missing a setting as it 
> shouldn't be attempting to connect via SSH, since windows only works with 
> Winrm (at the moment).
>
> If you are able to establish a WinRM connection but still receive 401 
> Unauthorized, check that the local user name exists on the Windows machine 
> and you have supplied the correct password.  Sometimes the windows event 
> log (eventvwr) will give you a clue as well.
>
> Hope this helps,
>
> Jon
>
> On Monday, 1 February 2016 12:22:21 UTC, Kiran wrote:
>>
>> I want to manage Windows servers with Ansible 1.9 running on a Linux 
>> server.
>>
>>
>> I'd prefer to use a local Windows account without installing Moba SSH. I 
>> found very little documentation on how to set up Ansible with Windows 
>> servers. I have a Linux server running Ansible.  I am trying to configure 
>> Ansible to push files to a Windows server. I have a basic playbook. The 
>> /etc/ansible/hosts file has an entry for an IP address for the Windows 
>> server. The /etc/ansible/hosts file is configured to use a local user 
>> account on the Windows server. I am not using Kerberos. I am not trying to 
>> use Windows domain authentication. Do I need to use Kerberos or Windows 
>> domain authentication to have Ansible manage Windows servers? 
>>
>>
>> When the /etc/ansible/hosts file has this entry (in the [windows:var] 
>> section):  ansible_connection=winrm 
>>
>> I can run a playbook and get the following output:
>>
>> ESTABLISH WINRM CONNECTION... fata [x.x.x.x] => 401 Unauthorized
>>
>> The above playbook run corresponds with no event logging on the Windows 
>> server. The below output corresponds with Windows Server System Log events. 
>>
>> When the /etc/ansible/hosts file has this entry (in the [windows:var] 
>> section, and instead of the ansible_connection entry above):  
>> ansible_ssh_connection=winrm 
>>
>>
>> and I run a playbook, I get this output:
>>
>> ESTABLISH CONNECTION FOR USER... PasswordAuthentication=no ... fatal: 
>> [x.x.x.x] => SSH Error: Connection timed out during banner exchange ... 
>> unreachable = 1 ...
>>
>> I expect the Playbook to work. I don't expect the PasswordAuthentication 
>> to be set to no. I'm not sure how SSH works with a Windows server. I want 
>> to use Ansible to manage a Windows server with local authentication.
>>
>

-- 
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/ed27e46f-bd4f-474a-b708-c5f007d3a9cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to