Reputation: 41
I am getting the following error when using ansible-tower to connect to my windows machine.
I did go use the ansible tower connecting to windows where they suggested to use the following under inventories > variables
:
ansible_connection: winrm
ansible_ssh_port: 5986
ansible_winrm_server_cert_validation: ignore
But when I run the job it still fails, looks like it is still trying to use ssh
not winrm
to connect. Below is the out put from my ansible tower job:
> ansible-playbook 2.4.1.0
config file = /etc/ansible/ansible.cfg
> configured module search path = [u'/var/lib/awx/.ansible/plugins/modules',
> u'/usr/share/ansible/plugins/modules'] ansible python module
> location = /usr/lib/python2.7/site-packages/ansible executable
> location = /usr/bin/ansible-playbook python version = 2.7.5
> (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat
> 4.8.5-14)] Using /etc/ansible/ansible.cfg as config file SSH password: PLAYBOOK: main.yaml
> ************************************************************ 1 plays in main.yaml PLAY [all]
> ********************************************************************* 11:24:35 TASK [Gathering Facts]
> ********************************************************* 11:24:35 fatal: [server_ip]: UNREACHABLE! => {"changed": false, "msg": "ssl:
> the specified credentials were rejected by the server", "unreachable":
> true}
Am I missing anything? I see mostly people talking about ansible but not tower. I was able to get this working using ansible so I know I can connect to the windows server. Thanks.
Upvotes: 3
Views: 17844
Reputation: 143
I've googled a lot and finally the below configuration worked for me. I've added ntlm to my config file.
ansible_user: [email protected]
ansible_password: password
ansible_connection: winrm
ansible_ssh_port: 5986
ansible_winrm_transport: ntlm
ansible_winrm_server_cert_validation: ignore
Upvotes: 9
Reputation: 41
Got this to work following this article thanks to the author ansible kerberos setup, may help someone else:
Upvotes: 1