You are using domain account or local account? Vào Th 2, 12 thg 10, 2020 vào lúc 17:18 uday kiran <[email protected]> đã viết:
> But the credentials are correct. > > On Saturday, 10 October 2020 at 05:25:37 UTC+5:30 [email protected] wrote: > >> The ping and win_ping modules aren't doing an ICMP ping, they are >> checking to see if Ansible can connect to the host and execute a very basic >> module. In your case it's able to connect to the host but it's enable to >> authenticate using the credentials you have specified. See >> https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html#http-401-credentials-rejected >> for a list of reasons why it might be rejecting your credentials. >> >> On Friday, October 9, 2020 at 7:20:56 PM UTC+10 [email protected] wrote: >> >>> 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. >>> >>> -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/23d75dbc-5150-442c-a7d3-22b67aa09a22n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/23d75dbc-5150-442c-a7d3-22b67aa09a22n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnV636eXWHf3P9jPNvE74JM2EAxnP--Fq9R8%2Bo3f%3DTbgtxv7A%40mail.gmail.com.
