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/fa5266c9-26fe-4090-b9e9-ba137c267d8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to