Hmm. That would explain some random issues that we had in the past with this playbook


On 11/29/2018 08:15 PM, Matt Martz wrote:
A when statement supplied to flush_handlers has never worked.  It was silently ignored in the past, but now has a warning.

There is an open feature request to allow this to work:
https://github.com/ansible/ansible/issues/41313


On Thu, Nov 29, 2018 at 1:09 PM Frank Thommen <[email protected] <mailto:[email protected]>> wrote:

    Hello,

    our latest yum update brought ansible from 2.4.2.0 to 2.7.2 and now we
    are facing

         [WARNING]: flush_handlers task does not support when conditional

    we need the handlers to be flushed at that point, as later tasks
    rely on
    previously reconfigured services to be reloaded.  The "when" originates
    from our role definition:

    ----------------------
    - hosts: all
        name:  "====== BLAH ======"
        roles:
          - { role: blah, when: has_blah|default(False) }
        tags:
          - blah-only
    ----------------------
    (has_blah is an inventory variable, the hosts which "have blah" are
    spread over all our host groups.  To organize them in a separate host
    group would be too much overhead as this characteristic can change very
    often).

    I can't find this restriction mentioned anywhere in the changelogs or
    the documentation of handlers or "meta" and I wonder

    a) why this - IMHO irritating - change of behaviour has been introduced

    and

    b) what would be the best way to work around it


    Any help or hint is appreciated.


    frank


-- 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]
    <mailto:ansible-project%[email protected]>.
    To post to this group, send email to
    [email protected]
    <mailto:[email protected]>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/ansible-project/f9ecce8b-2c47-472d-ad1e-9074f3894070%40drosera.ch.
    For more options, visit https://groups.google.com/d/optout.

--
Matt Martz
@sivel
sivel.net <http://sivel.net>

--
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] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v95xvMwYZmJP0Lqh%3Drq3rxeDiEg4xCXB%3Dp09yFVra1z-A%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CAD8N0v95xvMwYZmJP0Lqh%3Drq3rxeDiEg4xCXB%3Dp09yFVra1z-A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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/4b41a481-2421-dcb1-aac2-6bef2e97cd9c%40drosera.ch.
For more options, visit https://groups.google.com/d/optout.

Reply via email to