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: <NULL>\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
On Thursday, October 26, 2017 at 9:42:43 AM UTC-4, [email protected]
wrote:
>
> 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] ******************************
> ******************************************************
>
> TASK [SHOW CONFIGURATION]
> ********************************************************************************
> [WARNING]: argument username has been deprecated and will be removed in a
> future version
>
> [WARNING]: argument host has been deprecated and will be removed in a
> future version
>
> [WARNING]: argument password has been deprecated and will be removed in a
> future version
>
> ok: [switch1]
>
> PLAY RECAP
> ***********************************************************************************************
> switch1 : ok=1 changed=0 unreachable=0
> failed=0
>
>
> *My YAML file:-*
>
> cat config.yml
> ---
>
> - name: RUNNING CONFIG
> hosts: ios
> gather_facts: no
> connection: local
>
> tasks:
>
> - name: SHOW CONFIGURATION
> ios_command:
> commands:
> - show version
> - show interface summary
> username: "{{ un }}"
> password: "{{ pwd }}"
> host: "{{ inventory_hostname }}"
>
> Am i missing something? Appreciate your support.
>
> Thanks,
> Dipak
>
--
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/958dffd9-944d-4005-8d59-7096dc6295e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.