Freinds,

I wanted to create a playbook which I can take handy to verify my Cisco IOS 
device to check following things for me:-

a) creating a logic to confirm reload uptime is recent (i.e is after the 
upgrade & reload)
b) matching the latest code from the boot.
c) collectively displaying the number successful and non-successful 
upgrades based on above parameter. (Most important because of large 
number of devices I shall be considering for upgrade based on verification 
done)


Following above objectives I also wanted to:-
d) create a dictionary/list which would also have list of latest codes 
based on different IOS model, which can be picked to match to confirm the 
device has been upgraded to correct version or not.


I created a playbook which does the very basic job. I would like to get the 
a output which can run on 100 devices and give me a output like how many 
devices has the desired code and how does not, in a precise format ?


Can some please help on how can I achieve above milestone?


-bash-4.1$ cat ios_post_check.yml
---
- name: IOS UPGRADE CHECK
  hosts: "ios"
  gather_facts: no
  connection: local

  tasks:
    - name: CREDENTIAL
      include_vars: credentials.yml

    - name: IOS VERSION AND UPTIME CHECK
      ios_command:
         provider: "{{creds}}"
         host: "{{ inventory_hostname }}"
         commands:
                - terminal length 0
                - show version | in uptime|boot
                - sh run | in boot
      register: output

    - name: 
      debug:
          var: output.stdout_lines

Thank You !!

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7b6f62c9-3152-4921-aea7-a412b267902d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to