fatal: [XXXX]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell.

703 views
Skip to first unread message

Sunil6057

unread,
Aug 14, 2017, 11:52:45 AM8/14/17
to Ansible Project
Hi 

When running playbook i am geting (running Ansible 2.4)

fatal: [XXXXX]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell.

Try host_key .....False no use..

need advice / help

Adrian Likins

unread,
Aug 14, 2017, 12:03:39 PM8/14/17
to ansible...@googlegroups.com
You need to provide more info.

- include the playbook
- the env (os, distro, version, etc) you are running ansible from
- the env (os, distro, version, etc) you running the playbook against (the remote machine being managed)
- any ansible config
- the actual command line being used to start ansible-playbook
- the full output from the failed ansible-playbook invocation (with the verbosity level raised by adding the '-vvvv' cli opts to ansible-playbook command)
- what you expect to happen


--
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/773c96f0-e883-4dca-9c4c-46bab8651c94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sunil6057

unread,
Aug 14, 2017, 2:36:51 PM8/14/17
to Ansible Project
-bash-4.2$ ansible --version
ansible 2.4.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/ansible/lib/ansible']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug  2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
-bash-4.2$

-bash-4.2$ cat cli-test.yml
---

- name: Save running config to file (NXOS)
  hosts: testleafs
  gather_facts: no
  connection: local

  tasks:
    - name: VER
      nxos_command:
        commands: show version
        host: "[[ inventory_homename }}"
        username: sg0219622
        password: Sunven!2
        register: output
        timeout: 30

-bash-4.2$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

Remote machine is cisco NX-OS

-bash-4.2$ ansible-playbook cli-test.yml -vvvv
ansible-playbook 2.4.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/ansible/lib/ansible']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Aug  2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/callback/__init__.pyc

PLAYBOOK: cli-test.yml ****************************************************************************************************************************************************************
1 plays in cli-test.yml

PLAY [Save running config to file (NXOS)] *********************************************************************************************************************************************
META: ran handlers

TASK [VER] ****************************************************************************************************************************************************************************
task path: /etc/ansible/cli-test.yml:9
<ctx-sw-var01> connection transport is cli
<[[ inventory_homename }}> using connection plugin network_cli
<ctx-sw-var02> connection transport is cli
<[[ inventory_homename }}> using connection plugin network_cli
<[[ inventory_homename }}> socket_path: None
fatal: [ctx-sw-var01]: FAILED! => {
    "changed": false,
    "failed": true,
}
<[[ inventory_homename }}> socket_path: None
fatal: [ctx-sw-var02]: FAILED! => {
    "changed": false,
    "failed": true,
}
 [WARNING]: Could not create retry file '/etc/ansible/cli-test.retry'.         [Errno 13] Permission denied: u'/etc/ansible/cli-test.retry'


PLAY RECAP ****************************************************************************************************************************************************************************
ctx-sw-var01               : ok=0    changed=0    unreachable=0    failed=1
ctx-sw-var02               : ok=0    changed=0    unreachable=0    failed=1



On Monday, August 14, 2017 at 11:03:39 AM UTC-5, Adrian Likins wrote:
You need to provide more info.

- include the playbook
- the env (os, distro, version, etc) you are running ansible from
- the env (os, distro, version, etc) you running the playbook against (the remote machine being managed)
- any ansible config
- the actual command line being used to start ansible-playbook
- the full output from the failed ansible-playbook invocation (with the verbosity level raised by adding the '-vvvv' cli opts to ansible-playbook command)
- what you expect to happen

On Mon, Aug 14, 2017 at 11:52 AM, Sunil6057 <sunil...@gmail.com> wrote:
Hi 

When running playbook i am geting (running Ansible 2.4)

fatal: [XXXXX]: FAILED! => {"changed": false, "failed": true, "msg": "unable to open shell.

Try host_key .....False no use..

need advice / help

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.

Sunil6057

unread,
Aug 15, 2017, 12:44:43 PM8/15/17
to Ansible Project
ANY help?

Kai Stian Olstad

unread,
Aug 15, 2017, 2:24:05 PM8/15/17
to ansible...@googlegroups.com
On 14. aug. 2017 20:36, Sunil6057 wrote:
> ---
>
> - name: Save running config to file (NXOS)
> hosts: testleafs
> gather_facts: no
> connection: local
>
> tasks:
> - name: VER
> nxos_command:
> commands: show version
> host: "[[ inventory_homename }}"

You should probably try with the correct brackets.


--
Kai Stian Olstad

Sunil6057

unread,
Aug 15, 2017, 10:24:36 PM8/15/17
to Ansible Project, ansible-pr...@olstad.com
i tried
---
- hosts: testleafs
  gather_facts: no
  connection: local

  tasks:
    - name: return show commands output
      nxos_command:
        commands:
          - show version
          - show running-config
        host: "{{ inventory_hostname }}"
        username: sssss
        password: Satnum
      register: output

    - debug: var=output

Same issue....

false, "failed": true, "msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"}


Sunil6057

unread,
Aug 17, 2017, 1:52:44 AM8/17/17
to Ansible Project
ANy help.........


On Monday, August 14, 2017 at 10:52:45 AM UTC-5, Sunil6057 wrote:

Kai Stian Olstad

unread,
Aug 18, 2017, 2:56:01 PM8/18/17
to ansible...@googlegroups.com
On 16. aug. 2017 04:24, Sunil6057 wrote:
> i tried
> ---
> - hosts: testleafs
> gather_facts: no
> connection: local
>
> tasks:
> - name: return show commands output
> nxos_command:
> commands:
> - show version
> - show running-config
> host: "{{ inventory_hostname }}"
> username: sssss
> password: Satnum
> register: output
>
> - debug: var=output
>
> Same issue....

It can't be the same issue since you have changed your code.

So we can't make this a guessing game, you need to provide more
information like the output including the error message (as Adrian
already have indicated).

So what is you error message now?


--
Kai Stian Olstad

Sunil6057

unread,
Aug 19, 2017, 12:33:41 AM8/19/17
to Ansible Project, ansible-pr...@olstad.com



hi Sorry 

Error and play-book is as below

---
- hosts: testleafs
  gather_facts: no
  connection: local

  tasks:
    - set_fact:
        provider:
          host: "{{ inventory_hostname }}"
          username: sg0219622
          password: Sunven!2

    - name: RUN ' SHOW VERSION '
      nxos_command:
        provider: "{{ provider }}"
        commands:
           - show version
        host: "{{ inventory_hostname }}"
      register: version

    - debug: var=version.stdout_lines






TASK [RUN ' SHOW VERSION '] ***********************************************************************************************************************************************************
task path: /etc/ansible/cli-test.yml:13
 21676 1503116896.84273: sending task start callback
 21676 1503116896.84281: entering _queue_task() for XX-XX-XX01/nxos_command
 21676 1503116896.84290: Creating lock for nxos_command
 21676 1503116896.84385: worker is 1 (out of 2 available)
 21676 1503116896.84440: exiting _queue_task() for XX-XX-XX01/nxos_command
 21676 1503116896.84503: getting variables
 21676 1503116896.84517: in VariableManager get_vars()
 21676 1503116896.84581: Loading FilterModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 21676 1503116896.84597: Loading FilterModule 'ipaddr' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 21676 1503116896.84610: Loading FilterModule 'json_query' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
 21676 1503116896.84622: Loading FilterModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 21676 1503116896.84657: Loading TestModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 21676 1503116896.84669: Loading TestModule 'files' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 21676 1503116896.84681: Loading TestModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 21689 1503116896.84675: running TaskExecutor() for XX-XX-XX01/TASK: RUN ' SHOW VERSION '
 21689 1503116896.84726: in run() - task 005056aa-ed3c-a5a6-2fbf-000000000008
 21689 1503116896.84762: calling self._execute()
 21676 1503116896.84777: Calling all_inventory to load vars for XX-XX-XX02
 21676 1503116896.84797: Calling groups_inventory to load vars for XX-XX-XX02
 21676 1503116896.84811: Calling all_plugins_inventory to load vars for XX-XX-XX02
 21676 1503116896.84834: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 21676 1503116896.84854: Calling all_plugins_play to load vars for XX-XX-XX02
 21676 1503116896.84876: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 21676 1503116896.84895: Calling groups_plugins_inventory to load vars for XX-XX-XX02
 21676 1503116896.84916: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 21676 1503116896.84938: Calling groups_plugins_play to load vars for XX-XX-XX02
 21676 1503116896.84959: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 21689 1503116896.84961: Loading FilterModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 21689 1503116896.84980: Loading FilterModule 'ipaddr' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 21689 1503116896.84992: Loading FilterModule 'json_query' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
 21676 1503116896.85001: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 21689 1503116896.85001: Loading FilterModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 21689 1503116896.85024: Loading TestModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 21676 1503116896.85027: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 21689 1503116896.85035: Loading TestModule 'files' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 21689 1503116896.85045: Loading TestModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 21676 1503116896.85059: done with get_vars()
 21676 1503116896.85077: done getting variables
 21676 1503116896.85090: entering _queue_task() for XX-XX-XX02/nxos_command
 21676 1503116896.85182: worker is 2 (out of 2 available)
 21689 1503116896.85216: Loading FilterModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 21689 1503116896.85230: Loading FilterModule 'ipaddr' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 21689 1503116896.85241: Loading FilterModule 'json_query' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
 21676 1503116896.85245: exiting _queue_task() for XX-XX-XX02/nxos_command
 21689 1503116896.85251: Loading FilterModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 21689 1503116896.85272: Loading TestModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 21689 1503116896.85283: Loading TestModule 'files' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 21676 1503116896.85287: done queuing things up, now waiting for results queue to drain
 21689 1503116896.85296: Loading TestModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 21676 1503116896.85299: waiting for pending results...
 21689 1503116896.85576: Loading Connection 'local' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/connection/local.py
 21689 1503116896.85629: Loading ShellModule 'csh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/csh.py
 21690 1503116896.85631: running TaskExecutor() for XX-XX-XX02/TASK: RUN ' SHOW VERSION '
 21689 1503116896.85666: Loading ShellModule 'fish' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/fish.py
 21690 1503116896.85681: in run() - task 005056aa-ed3c-a5a6-2fbf-000000000008
 21689 1503116896.85706: Loading ShellModule 'powershell' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/powershell.py
 21690 1503116896.85725: calling self._execute()
 21689 1503116896.85729: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/sh.py
 21689 1503116896.85754: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 21689 1503116896.85867: Loading ActionModule 'nxos' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/action/nxos.py
 21689 1503116896.85882: starting attempt loop
 21689 1503116896.85895: running the handler
<XX-XX-XX01> connection transport is cli
 21690 1503116896.85914: Loading FilterModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 21690 1503116896.85928: Loading FilterModule 'ipaddr' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 21690 1503116896.85941: Loading FilterModule 'json_query' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
<XX-XX-XX01> using connection plugin network_cli
 21690 1503116896.85951: Loading FilterModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 21690 1503116896.85981: Loading TestModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 21690 1503116896.86001: Loading TestModule 'files' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 21689 1503116896.86005: Loading Connection 'persistent' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/connection/persistent.py
 21690 1503116896.86013: Loading TestModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 21689 1503116896.86030: Loading ShellModule 'csh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
 21689 1503116896.86042: Loading ShellModule 'fish' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
 21689 1503116896.86053: Loading ShellModule 'powershell' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
 21689 1503116896.86064: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 21689 1503116896.86075: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 21690 1503116896.86211: Loading FilterModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
 21690 1503116896.86227: Loading FilterModule 'ipaddr' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
 21690 1503116896.86237: Loading FilterModule 'json_query' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
 21690 1503116896.86248: Loading FilterModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
 21690 1503116896.86272: Loading TestModule 'core' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
 21690 1503116896.86283: Loading TestModule 'files' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
 21690 1503116896.86297: Loading TestModule 'mathstuff' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
 21690 1503116896.86583: Loading Connection 'local' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/connection/local.py
 21690 1503116896.86640: Loading ShellModule 'csh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/csh.py
 21690 1503116896.86677: Loading ShellModule 'fish' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/fish.py
 21690 1503116896.86716: Loading ShellModule 'powershell' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/powershell.py
 21690 1503116896.86738: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/sh.py
 21690 1503116896.86762: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 21690 1503116896.86895: Loading ActionModule 'nxos' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/action/nxos.py
 21690 1503116896.86911: starting attempt loop
 21690 1503116896.86922: running the handler
<XX-XX-XX02> connection transport is cli
<XX-XX-XX02> using connection plugin network_cli
 21690 1503116896.87015: Loading Connection 'persistent' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/connection/persistent.py
 21690 1503116896.87039: Loading ShellModule 'csh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/csh.py (found_in_cache=True, class_only=False)
 21690 1503116896.87052: Loading ShellModule 'fish' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/fish.py (found_in_cache=True, class_only=False)
 21690 1503116896.87063: Loading ShellModule 'powershell' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/powershell.py (found_in_cache=True, class_only=False)
 21690 1503116896.87077: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 21690 1503116896.87093: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 21689 1503116897.43762: done running TaskExecutor() for XX-XX-XX01/TASK: RUN ' SHOW VERSION ' [005056aa-ed3c-a5a6-2fbf-000000000008]
 21689 1503116897.43802: sending task result for task 005056aa-ed3c-a5a6-2fbf-000000000008
 21689 1503116897.43852: done sending task result for task 005056aa-ed3c-a5a6-2fbf-000000000008
 21689 1503116897.43864: WORKER PROCESS EXITING
 21676 1503116897.44121: marking XX-XX-XX01 as failed
 21676 1503116897.44144: marking host XX-XX-XX01 failed, current state: HOST STATE: block=2, task=2, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 21676 1503116897.44158: ^ failed state is now: HOST STATE: block=2, task=2, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 21676 1503116897.44170: getting the next task for host XX-XX-XX01
 21676 1503116897.44180: host XX-XX-XX01 is done iterating, returning
The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/executor/task_executor.py", line 125, in run
    res = self._execute()
  File "/usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/executor/task_executor.py", line 526, in _execute
    result = self._handler.run(task_vars=variables)
  File "/usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/action/nxos.py", line 73, in run
    socket_path = connection.run()
  File "/usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/connection/persistent.py", line 103, in run
    out = p.stdout.readline()
ValueError: I/O operation on closed file

fatal: [XX-XX-XX01]: FAILED! => {
    "failed": true,
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}
 21690 1503116897.44892: done running TaskExecutor() for XX-XX-XX02/TASK: RUN ' SHOW VERSION ' [005056aa-ed3c-a5a6-2fbf-000000000008]
 21690 1503116897.44926: sending task result for task 005056aa-ed3c-a5a6-2fbf-000000000008
 21690 1503116897.44966: done sending task result for task 005056aa-ed3c-a5a6-2fbf-000000000008
 21690 1503116897.45001: WORKER PROCESS EXITING
 21676 1503116897.45182: marking XX-XX-XX02 as failed
 21676 1503116897.45200: marking host XX-XX-XX02 failed, current state: HOST STATE: block=2, task=2, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 21676 1503116897.45212: ^ failed state is now: HOST STATE: block=2, task=2, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_TASKS, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 21676 1503116897.45222: getting the next task for host XX-XX-XX02
 21676 1503116897.45231: host XX-XX-XX02 is done iterating, returning
The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/executor/task_executor.py", line 125, in run
    res = self._execute()
  File "/usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/executor/task_executor.py", line 526, in _execute
    result = self._handler.run(task_vars=variables)
  File "/usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/action/nxos.py", line 73, in run
    socket_path = connection.run()
  File "/usr/lib/python2.7/site-packages/ansible-2.4.0-py2.7.egg/ansible/plugins/connection/persistent.py", line 103, in run
    out = p.stdout.readline()
ValueError: I/O operation on closed file

fatal: [XX-XX-XX02]: FAILED! => {
    "failed": true,
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}
 21676 1503116897.45267: no more pending results, returning what we have
 21676 1503116897.45277: results queue empty
 21676 1503116897.45285: checking for any_errors_fatal
 21676 1503116897.45297: done checking for any_errors_fatal
 21676 1503116897.45305: checking for max_fail_percentage
 21676 1503116897.45313: done checking for max_fail_percentage
 21676 1503116897.45321: checking to see if all hosts have failed and the running result is not ok
 21676 1503116897.45328: done checking to see if all hosts have failed
 21676 1503116897.45335: getting the remaining hosts for this loop
 21676 1503116897.45346: done getting the remaining hosts for this loop
 21676 1503116897.45356: building list of next tasks for hosts
 21676 1503116897.45363: getting the next task for host XX-XX-XX01
 21676 1503116897.45371: host XX-XX-XX01 is done iterating, returning
 21676 1503116897.45379: getting the next task for host XX-XX-XX02
 21676 1503116897.45387: host XX-XX-XX02 is done iterating, returning
 21676 1503116897.45396: done building task lists
 21676 1503116897.45403: counting tasks in each state of execution
 21676 1503116897.45410: done counting tasks in each state of execution:
        num_setups: 0
        num_tasks: 0
        num_rescue: 0
        num_always: 0
 21676 1503116897.45419: all hosts are done, so returning None's for all hosts
 21676 1503116897.45428: done queuing things up, now waiting for results queue to drain
 21676 1503116897.45436: results queue empty
 21676 1503116897.45443: checking for any_errors_fatal
 21676 1503116897.45450: done checking for any_errors_fatal
 21676 1503116897.45457: checking for max_fail_percentage
 21676 1503116897.45464: done checking for max_fail_percentage
 21676 1503116897.45471: checking to see if all hosts have failed and the running result is not ok
 21676 1503116897.45479: done checking to see if all hosts have failed
 21676 1503116897.45489: getting the next task for host XX-XX-XX01
 21676 1503116897.45498: host XX-XX-XX01 is done iterating, returning
 21676 1503116897.45506: getting the next task for host XX-XX-XX02
 21676 1503116897.45514: host XX-XX-XX02 is done iterating, returning
 21676 1503116897.45523: running handlers
        to retry, use: --limit @/etc/ansible/cli-test.retry

PLAY RECAP ****************************************************************************************************************************************************************************
XX-XX-XX01               : ok=1    changed=0    unreachable=0    failed=1
XX-XX-XX02               : ok=1    changed=0    unreachable=0    failed=1


Sunil6057

unread,
Aug 22, 2017, 9:48:02 PM8/22/17
to Ansible Project
Help...............


On Monday, August 14, 2017 at 10:52:45 AM UTC-5, Sunil6057 wrote:

Ganesh Nalawade

unread,
Sep 20, 2017, 3:09:30 AM9/20/17
to Ansible Project

Can you please re-try this on the released version of 2.4 and check if you are still seeing this issue.


Regards,
Ganesh
Reply all
Reply to author
Forward
0 new messages