ICMP protocol is emabled on remote machine.
Remote desktop is also enabled.
winrm and enable-psremoting also enabled
Ran, below commands also.
winrm set winrm/config/client/auth ‘@{Basic=“true”}’
winrm set winrm/config/service/auth ‘@{Basic=“true”}’
Able to ping the remote windows serer 2019 machine from ansible server ubuntu machine.
But when I ran a ping test, win_ping from ansible, getting below error.
adminuser@ansible-server:~/Desktop/DM$ ansible windows -m win_ping -vvv -i inventory.yml
ansible 2.9.12
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/home/adminuser/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 9.2.1 20191008]
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /home/adminuser/Desktop/DM/inventory.yml as it did not pass its verify_file() method
script declined parsing /home/adminuser/Desktop/DM/inventory.yml as it did not pass its verify_file() method
Parsed /home/adminuser/Desktop/DM/inventory.yml inventory source with ini plugin
META: ran handlers
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_ping.ps1
Pipelining is enabled.
[WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an up-to-date version of pywinrm installed?)
<10.1.85.246> ESTABLISH WINRM CONNECTION FOR USER: administrator on PORT 5985 TO 10.1.85.246
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_ping.ps1
Pipelining is enabled.
[WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an up-to-date version of pywinrm installed?)
<10.1.85.236> ESTABLISH WINRM CONNECTION FOR USER: administrator on PORT 5985 TO 10.1.85.236
build-machine3 | UNREACHABLE! => {
“changed”: false,
“msg”: “ntlm: the specified credentials were rejected by the server”,
“unreachable”: true
}
EXEC (via pipeline wrapper)
build-machine2 | SUCCESS => {
“changed”: false,
“invocation”: {
“module_args”: {
“data”: “pong”
}
},
“ping”: “pong”
}
META: ran handlers
META: ran handlers
On build-machine2 everything is open, firewall disabled.
But on build-machine3 this problem occured but ICMP all protocols enabled and winrm also.