I usually use below script to check free space before proceeding to copy 
image. But when i need to copy image to a stacked switch, will this command 
show free space in ALL member switches or will it show only master switch 
free space?

I don't have a stacked switch to test. So need your advise before i 
implement in prod.

name: Gather IOS Facts
ios_facts: 

 - debug: 
 msg: - "Free space is {{ ansible_net_memfree_mb }}"

  

If i give additional command that image need to be copied only if i give a 
conditional that image should be copied only when free space is above 
certain MB, will ii check this conditional only for master switch or for 
all memnber switches?

   - 
   
   name: COPY IOS IMAGE TO DEVICE AND ALLOW MAXIMUM TIME OF 60 MINS TO 
   FINISH
   ios_command: commands: - command: "copy 
   
   ftp://username:password@10.6.1.104 
<username@10.6.1.104>/cat3k_caa-universalk9.16.03.09.SPA.bin 
   flash:"
   prompt: 'Destination filename 
   \[cat3k_caa-universalk9.16.03.09.SPA.bin\]?' answer: "\r" vars: 
   ansible_command_timeout: 3600 
   -  when: - ansible_net_memfree_mb >= 1113

-- 
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/6994c6d6-717a-49fc-92f3-36a5bd74f530n%40googlegroups.com.

Reply via email to