Hi Anthony,

Sorry for the confusion. I mean that 'any' switch and not 'every' switch.

As i said earlier, every switch needs to be in READY state to proceed 
otherwise it's going to cause problem. So i have written the script to 
check even if 1 switch in the stack is in a state other than READY, then 
playbook has to end.

Regards,
Vikram

On Friday, 19 March, 2021 at 11:08:12 pm UTC+5:30 Antony Stone wrote:

> On Friday 19 March 2021 at 17:56:38, Vikram S wrote:
>
> > Hi Antony,
> > 
> > Yes, i want to end the playbook if every member switch in a stack is in
> > some state state other than ready. I am writing script for IOS upgrade 
> and
> > every switch needs to be in READY state to proceed otherwise it's going 
> to
> > cause problem.
>
> Now I am even more confused.
>
> First you say: "I want to end the playbook if every member switch in a 
> stack 
> is in some state state other than ready."
>
> So, every switch must be in a state other than ready, for the playbook to 
> end.
>
> One switch in ready state means this is not true, so the playbook 
> continues.
>
> Then you say instead: "every switch needs to be in READY state to proceed 
> otherwise it's going to cause problem"
>
> So, now every switch must be in ready state for the playbook to proceed.
>
> Any switch which is not in ready state causes the playbook to fail.
>
>
> The two statements do not match, and it's important that you are clear 
> about 
> what logic you are trying to implement in order to get the syntax right.
>
> I *think* you probably intend the second state - all switches must be 
> ready, 
> otherwise you stop, but they're not my switches :)
>
>
> Antony.
>
> -- 
> This email was created using 100% recycled electrons.
>
> Please reply to the list;
> please *don't* CC me.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/89c83b99-8b2c-4b1f-a808-f6f53ce35141n%40googlegroups.com.

Reply via email to