formatting IOS commands

28 views
Skip to first unread message

rajthecomputerguy

unread,
Jul 11, 2019, 3:23:13 PM7/11/19
to Ansible Project
Hi Team,

I am collecting IOS commands in my playbook and I need output human readable , I use( to_nice_yaml(indent=8, width=1337) currently. Any other suggestions to view the output as human readable. 

ios_command:
 30     commands:
 31     - show switch detail
 32     - show module
 33     - show switch stack-ports
 34     - show switch stack-ports summary
 35     - show ip int brief
 36     - show interface description
 37     - show interface status
 38     - show etherchannel summary
 39     - show cdp neighbors
 40     - show env all
 41     - show run
 42     - show version

rajthecomputerguy

unread,
Jul 23, 2019, 8:05:36 AM7/23/19
to Ansible Project
It has been fixed. you will get nice output by setting below options in configuration file.

STDOUT_CALLBACK = yaml
bin_ansible_callbacks = True

thanks
Reply all
Reply to author
Forward
0 new messages