Hello AnsibleProjectForum, im trying to deploy ansible with winrm module.
First thing, sorry for my english, im not native english speaker.
Im launching Ansible from Ubuntu to Windows. I have installed the necessary module ( with pip install “pywinrm>=0.3.0” ).
My purpose is to create a playbook that allow me to deploy and configure a winlogbeat in a remote windows machine.
For that im trying to connect using user and password with Basic authentication method.
I have nothing at the moment that tells me im connecting correctly, just trying to do a win_ping with ansible command and doesn’t work.
The command is: ansible GROUPNAME -m wing_ping -i INVENTORY/PATH -k
This is the inventory file:
[GROUP]
172.22.1.129
[GROUP:vars]
ansible_user=LocalUsername
ansible_password=Password
ansible_connection=winrm
ansible_winrm_transport=basic
ansible_port=(im testing between 5985 and 5986 ).
Looking aroung the Internets i found that i can use this variable when im trying to connect via https (port 5986) : ansible_winrm_server_cert_validation=ignore (because it is looking up for a certificate and i dont want to do it by certificate method).
Ansible always says that the server rejected the credentials:
172.22.1.129 | UNREACHABLE! => {
“changed”: false,
“msg”: “ssl: the specified credentials were rejected by the server”,
“unreachable”: true
}
Note that the normal ping works.
Can you guys help me out? If you can handle some code examples it would be handy.
Thank you and sorry again for my English.
Cheers!