-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,
"msg": "unable to open shell. Please see:
https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
<[[ inventory_homename }}> socket_path: None
fatal: [ctx-sw-var02]: FAILED! => {
"changed": false,
"failed": true,
"msg": "unable to open shell. Please see:
https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
[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 <[email protected]
> <javascript:>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/773c96f0-e883-4dca-9c4c-46bab8651c94%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/773c96f0-e883-4dca-9c4c-46bab8651c94%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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/634e8d0b-f5b4-4a9a-a3ab-cceb0482f0fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.