"Thanks for your suggestion. That does work, but as you said, ansible still
evaluates and skips all the tasks if the when: condition evaluates to
false. With a long task list that results in a lot of unnecessary skips."

You can turn off the skipped output in ansible.cfg.




On Mon, Aug 25, 2014 at 1:20 PM, Tomasz Kontusz <[email protected]>
wrote:

>
>
> Anand Buddhdev <[email protected]> napisał:
> >On Monday, August 25, 2014, Tomasz Kontusz <[email protected]>
> >wrote:
> >
> >Hi Tomasz,
> >
> >Another way to do this is to split your role in two, and have separate
> >> plays for CentOS 6 and 7. You can still have Ansible detect which
> >host
> >> should run which play by grouping them with group_by:
> >
> >
> >Thanks for this. I tried it and it also works. It does mean that every
> >ansible run always shows "changed=1" even if nothing ever changed,
> >because
> >group_by is not idempotent. This bothers the idempotence purist in me
> >:)
> Oh, it's as idempotent as you can get. But you are right, it's a pretty
> useless change notification - you can just put changed_when: no on it
>
>
> --
> Wysłane za pomocą K-9 Mail.
>
> --
> 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/166d68d8-9cae-4abd-ac97-be62bd5dc114%40email.android.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnsWgy%2BA9rYGU5qP0N94Q8GOk3CtbKzhhkPOf0_bE6wdDN6LA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to