run with -v (or -vvv) to see the output of the task on the command line

use register to further process the output (
http://docs.ansible.com/ansible/latest/playbooks_variables.html#registered-variables
)

On Thu, Oct 26, 2017 at 9:41 AM, <[email protected]> wrote:

>
>
> On Thursday, October 26, 2017 at 9:39:37 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/49b14432-3fbb-4342-9671-962e3e2bfd4a%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/49b14432-3fbb-4342-9671-962e3e2bfd4a%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/CAKEs6afgwDvS58b4unkv097C0JHAR1Dngu74H7ZRZ7VY5bcBVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to