[root@localhost ~]$ ansible s1 -m raw -a 'show ip interface brief' -k
SSH password:
s1 | SUCCESS | rc=0 >>
Shared connection to switch closed.
NO OUTPUT is displayed for the "show ip interface brief" argument
[root@localhost ~]$ ansible-playbook test.yml -k
SSH password:
PLAY [Device Version] *********************************************************************************************************************************************************************************************
TASK [show version] ***********************************************************************************************************************************************************************************************
changed: [s1]
TASK [debug] ******************************************************************************************************************************************************************************************************
ok: [s1] => {
"print_output.stdout_lines": []
} <--DOESN'T DISPLAY ANY OUTPUT
PLAY RECAP ********************************************************************************************************************************************************************************************************
s1 : ok=2 changed=1 unreachable=0 failed=0
root@ubuntu:~$ cat ansible.cfg
[defaults]
inventory = ./hosts
host_key_checking = false
timeout = 5
root@ubuntu:~$ cat hosts
s1 ansible_ssh_common_args="-c 3des-cbc"
root@ubuntu:~$ cat test.yml
---
- name: Device Version
hosts: rs301s1
gather_facts: false
tasks:
- name: show version
raw: "show version"
register: print_output
- debug: var=print_output.stdout_lines
I tried it on the following operation systems with the same results:
Ubuntu 18.04 LTS ansible 2.5.5
CentOS Linux release 7.5.1804 ansible 2.4.2.0
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/1OT0N_I1qlc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f9456750-fb46-4105-a664-26f63c0b2447%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.