Hi,

I wrote a script to check if particular IOS version is set as boot 
statement. But it doesn't work. What am i doing wrong?

name: Gather show boot

ios_command:

commands: "show boot"

register: show_boot

debug:

msg: "{{ 'show_boot.stdout' | 
regex_findall('c2960x-universalk9-mz.152-7.E3.bin') }}"


Also another objective is match number of boot statements set to number of 
stacked switches so that i can ensure all stacked switches have the correct 
boot statement set. So iam trying to match number of times IOS image is set 
in 'show boot' output to number of times a switch is in 'ready' state in 
'show switch' output. 

Below is a login i have come up with but not sure if this will work? Please 
give your suggestion for improvement if any?

msg: "{{ 'show_boot.stdout' | 
regex_findall('c2960x-universalk9-mz.152-7.E3.bin') | length }}" == msg: 
"{{ 'show_switch.stdout' | regex_findall('ready') | length }}"

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b25a08a2-bc8b-4e53-92cc-a8a7d3c11ebfn%40googlegroups.com.

Reply via email to