Any help in finding reason why i get error "socket_path: None" ?
COMPONENT NAME
ios_command

ANSIBLE VERSION

ansible 2.4.3.0
  config file = /mnt/c/Users/ajayr/Documents/overall_example/ansible.cfg
  configured module search path = 
[u'/home/ajayreddy28390/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = 
/home/ajayreddy28390/.local/lib/python2.7/site-packages/ansible
  executable location = /home/ajayreddy28390/.local/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]

CONFIGURATION

DEFAULT_HOST_LIST(/mnt/c/Users/ajayr/Documents/overall_example/ansible.cfg) 
= [u'/mnt/c/Users/ajayr/Documents/overall_example/hosts']
DEFAULT_TIMEOUT(/mnt/c/Users/ajayr/Documents/overall_example/ansible.cfg) = 
5
DEFAULT_TRANSPORT(/mnt/c/Users/ajayr/Documents/overall_example/ansible.cfg) 
= paramiko
HOST_KEY_CHECKING(/mnt/c/Users/ajayr/Documents/overall_example/ansible.cfg) 
= False

OS / ENVIRONMENT

Windows 10 Linux Emulator

SUMMARY

Ansible unable connect to hosts using SSH
STEPS TO REPRODUCE

cat ansible.cfg[defaults]transport = paramikohostfile = 
./hostshost_key_checking = falsetimeout = 
5ajayreddy28390@DESKTOP-0KSKK6B:/mnt/c/Users/ajayr/Documents/overall_example$ 
cat IOS_test.yml
---
- name: show version
  hosts: "ios-devices"
  gather_facts: false
  connection: local

  vars:
   cli:
     host: "{{ inventory_hostname }}"
     username: cisco
     password: Qazwsx12

  tasks:
    - name: show version
      ios_command:
        commands: show version
        provider: "{{ cli }}"

      register: output

    - name: show output
      debug:
        var: output.stdout

    - name: copy output to file
      copy: content="{{ output }}" dest=./output/{{ inventory_hostname 
}}.txt[overall_example.zip](https://github.com/ansible/ansible/files/1693025/overall_example.zip)

ACTUAL RESULTS

/mnt/c/Users/ajayr/Documents/overall_example$ ansible-playbook IOS_test.yml 
-vvvv
ansible-playbook 2.4.3.0
  config file = /mnt/c/Users/ajayr/Documents/overall_example/ansible.cfg
  configured module search path = 
[u'/home/ajayreddy28390/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = 
/home/ajayreddy28390/.local/lib/python2.7/site-packages/ansible
  executable location = /home/ajayreddy28390/.local/bin/ansible-playbook
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
Using /mnt/c/Users/ajayr/Documents/overall_example/ansible.cfg as config file
[DEPRECATION WARNING]: [defaults]hostfile option, The key is misleading as it 
can also be a list of hosts, a directory or a list of paths . This
feature will be removed in version 2.8. Deprecation warnings can be disabled by 
setting deprecation_warnings=False in ansible.cfg.
setting up inventory plugins
Parsed /mnt/c/Users/ajayr/Documents/overall_example/hosts inventory source with 
ini plugin
Loading callback plugin default of type stdout, v2.0 from 
/home/ajayreddy28390/.local/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc

PLAYBOOK: IOS_test.yml 
*******************************************************************************************************************************
1 plays in IOS_test.yml

PLAY [show version] 
**********************************************************************************************************************************
META: ran handlers

TASK [show version] 
**********************************************************************************************************************************
task path: /mnt/c/Users/ajayr/Documents/overall_example/IOS_test.yml:14
<192.168.24.250.xip.io> using connection plugin network_cli
<192.168.24.254.xip.io> using connection plugin network_cli
<192.168.24.250.xip.io> socket_path: None
fatal: [192.168.24.250.xip.io]: FAILED! => {
    "changed": false,
    "msg": "unable to open shell. Please see: 
https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell";
}
<192.168.24.254.xip.io> socket_path: None
fatal: [192.168.24.254.xip.io]: FAILED! => {
    "changed": false,
    "msg": "unable to open shell. Please see: 
https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell";
}
        to retry, use: --limit 
@/mnt/c/Users/ajayr/Documents/overall_example/IOS_test.retry

PLAY RECAP 
*******************************************************************************************************************************************
192.168.24.250.xip.io      : ok=0    changed=0    unreachable=0    failed=1
192.168.24.254.xip.io      : ok=0    changed=0    unreachable=0    failed=1

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f813bdcb-d08a-40e9-a9dd-cd2c4b78ac87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to