Yes:

tasks:

    - apt: name=redis state=installed
      notify:
         - remove sentinel

    # if you wish to remove it immediately don't do this, and see below

handlers:

    - name: remove sentinel
      file: path=foo state=absent

If you wish to remove it immediately, instead:

tasks:

  - apt: name=redis state=installed
    register: redis
  - file: path=foo state=absent
    when: redis.changed

etc



On Wed, Aug 27, 2014 at 12:08 PM, Mark Olliver <
[email protected]> wrote:

> Hi,
>
> We use a custom config file for redis sentinel, Is there a way with to say
> that when i have installed the redis package, to remove the file
> /etc/redis/sentinel.conf. But it should only remove it the once. Later in
> the run i check if the file is missing and if it is then I add the correct
> file, the file however is not updated on subsequent runs as it is managed
> by redis directly.
>
> Thanks
>
> Mark
>
> --
>  MARK OLLIVER HEAD OF IT OPERATIONS
>   T. +44(0) 20 7775 5628   [image: Infectious Media] 3-7 Herbal Hill /
> London / EC1R 5EJwww.infectiousmedia.com   [image: Infectious Media]
> <http://www.infectiousmedia.com/>   [image: Facebook]
> <http://www.facebook.com/infectiousmedia> [image: Twitter]
> <https://twitter.com/infectiousmedia> [image: LinkedIn]
> <http://www.linkedin.com/company/infectious-media-ltd> [image: Youtube]
> <http://www.youtube.com/user/InfectiousMediaLtd>       This email and any
> attachments are confidential and may also be privileged. If you are not
> the intended recipient, please notify the sender immediately, and do not
> disclose the contents to another person, use it for any purpose, or
> store, or copy the information in any medium. Please also destroy and
> delete the message from your computer.
>
>  --
> 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/CALKPxXi%2BEG72eG%2BtMQ16qYVeRWMdHk%2BpA5VQWyG_xWAgLkCQ4Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CALKPxXi%2BEG72eG%2BtMQ16qYVeRWMdHk%2BpA5VQWyG_xWAgLkCQ4Q%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/CA%2BnsWgw%3D7DhTUAGcR5p%2BHiyQK7_1Jy%3DSWmkygbWBjHE4ESdUHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to