UPDATE:

Update dynamic inventory with keyed group matching group_vars, then it 
picked up the winrm connection and it works fine

On Tuesday, January 28, 2020 at 4:42:34 PM UTC-4, Aravind Sivaraman wrote:
>
> I am testing the Azure Dynamic Inventory plugin, have a windows VM in one 
> of the resource group, when i am trying to do win_ping it default the 
> connection to SSH. How do I specify to use by windows credentials here?
>
> [ansible@NBP-HO7-Ansible01 windows]$ ansible all -m win_ping -i 
>> nbpazure_rm.yml -vvv
>> ansible 2.9.4
>>   config file = None
>>   configured module search path = 
>> ['/home/ansible/.ansible/plugins/modules', 
>> '/usr/share/ansible/plugins/modules']
>>   ansible python module location = 
>> /home/ansible/.local/lib/python3.6/site-packages/ansible
>>   executable location = /usr/local/bin/ansible
>>   python version = 3.6.8 (default, Aug  7 2019, 17:28:10) [GCC 4.8.5 
>> 20150623 (Red Hat 4.8.5-39)]
>> No config file found; using defaults
>> host_list declined parsing /home/ansible/ansible/windows/nbpazure_rm.yml 
>> as it did not pass its verify_file() method
>> script declined parsing /home/ansible/ansible/windows/nbpazure_rm.yml as 
>> it did not pass its verify_file() method
>> Parsed /home/ansible/ansible/windows/nbpazure_rm.yml inventory source 
>> with auto plugin
>> META: ran handlers
>> <10.112.1.5> ESTABLISH SSH CONNECTION FOR USER: None
>> <10.112.1.5> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s 
>> -o KbdInteractiveAuthentication=no -o 
>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
>> -o PasswordAuthentication=no -o ConnectTimeout=10 -o 
>> ControlPath=/home/ansible/.ansible/cp/1b5f4e058a 10.112.1.5 '/bin/sh -c 
>> '"'"'echo ~ && sleep 0'"'"''
>> <10.112.1.5> (255, b'', b'ssh: connect to host 10.112.1.5 port 22: 
>> Connection timed out\r\n')
>> an-testvm01_b1ec | UNREACHABLE! => {
>>     "changed": false,
>>     "msg": "Failed to connect to the host via ssh: ssh: connect to host 
>> 10.112.1.5 port 22: Connection timed out",
>>     "unreachable": true
>
>
>

-- 
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/aad10dfd-d096-4f27-9868-b94d97f77afd%40googlegroups.com.

Reply via email to