No Output from router

Hello Friends,

I’ve just picked up network automation with ansible and this is my first attempt to build a very simple playbook to run “show version” on Cisco IOS router.Although, playbook runs successfully but i can’t see any output from the router when playbook runs

----> ansible-playbook -i inventory config.yml
[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.

PLAY [RUNNING CONFIG] ******************************

Update:-

I can see the output with verbose option but format is messed up.

Any pointers? Also, is -v verbose option always needed explicitly?

ok: [switch1] => {“changed”: false, “failed”: false, “stdout”: ["Cisco IOS XE Software, Version 03.13.01.S - Extended Support Release\nCisco IOS Software, CSR1000V Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.4(3)S1, RELEASE SOFTWARE (fc3)\nTechnical Support: http://www..com/techsupport\nCopyright (c) 1986-2014 by Cisco Systems, Inc.\nCompiled Fri 31-Oct-14 17:32 by mcpre\n\n\nCisco IOS-XE software, Copyright (c) 2005-2014 by ******** Systems, Inc.\nAll rights reserved. Certain components of Cisco IOS-XE software are\nlicensed under the GNU General Public License ("GPL") Version 2.0. The\nsoftware code licensed under GPL Version 2.0 is free software that comes\nwith ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such\nGPL code under the terms of GPL Version 2.0. For more details, see the\ndocumentation or "License Notice" file accompanying the IOS-XE software,\nor the applicable URL provided on the flyer accompanying the IOS-XE\nsoftware.\n\n\nROM: IOS-XE ROMMON\n\nswitch1 uptime is 14 hours, 2 minutes\nUptime for this control processor is 14 hours, 2 minutes\nSystem returned to ROM by reload\nSystem image file is "bootflash:packages.conf"\nLast reload reason: \n\n\n\nThis product contains cryptographic features and is subject to United\nStates and local country laws governing import, export, transfer and\nuse. Delivery of Cisco cryptographic products does not imply\nthird-party authority to import, export, distribute or use encryption.\nImporters, exporters, distributors and users are responsible for\ncompliance with U.S. and local country laws. By using this product you\nagree to comply with applicable laws and regulations. If you are unable\nto comply with U.S. and local laws, return this product immediately.\n\nA summary of U.S. laws governing Cisco cryptographic products may be found at:\nhttp://www..com/wwl/export/crypto/tool/stqrg.html\n\nIf you require further assistance please contact us by sending email to\nexport@.com.\n\nLicense Level: ax\nLicense Type: Default. No valid license found.\nNext reload license Level: ax\n\n CSR1000V (VXE) processor (revision VXE) with 794460K/6147K bytes of memory.\nProcessor board ID 9TPABR0APCY\n3 Gigabit Ethernet interfaces\n32768K bytes of non-volati

Ansible don't print out result of a task, as its a configuration management tool and not a reporting tool.

To get the result from a task you need to register[1] the output in a variable.
When it's in a variable you have endless opportunity to do things with the result.

To print it out you have the debug module

[1] https://docs.ansible.com/ansible/latest/playbooks_variables.html#registered-variables