You can also flush handlers in the middle of a play with the following task:

   - meta: flush_handlers



On Thu, Dec 11, 2014 at 10:52 AM, Matt Hughes <[email protected]> wrote:

> K, I will use restarted.
>
> Handler wouldn’t work as handlers work only at the end of the play to my
> knowledge. That would be too later; subsequent tasks depend on docker being
> up.
>
>
>
>
>
> On December 11, 2014 at 10:59:32 AM, James Cammarata (
> [email protected]) wrote:
>
> Hi Matt, this appears to be an issue with the docker init script I'd say,
> which is only looking at the PID file and not the process it's supposed to
> be referring to. I would continue to use state=restarted, and simply modify
> that to either be a handler (notified by the install) or to have it use a
> when: statement, which could check to see if the install actually changed
> something before trying to restart the service.
>
> Hope that helps!
>
>
> On Thu, Dec 11, 2014 at 9:50 AM, Matt Hughes <[email protected]>
> wrote:
>
>> If I try and upgrade a package that has already been started, 'service'
>> module doesn't seem to behave:
>>
>>
>> - name: Install Docker
>>   yum: name=docker-io-1.3.1 state=installed
>> - name: Start Docker
>>   service: name=docker state=started
>>
>>
>> If Docker has already been installed and started and we just upgraded,
>> 'service' module blows up with:
>>
>> /var/run/docker.pid still exists...
>>
>>
>>
>> I have to manually issue a service state=restarted command to get hosts
>> back in line.  Is Docker misbehaving or should 'service' be smarter in this
>> case?
>> --
>> 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/1f46ebe4-2972-419a-b00d-f214d1ef0ba5%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/1f46ebe4-2972-419a-b00d-f214d1ef0ba5%40googlegroups.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 a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/N6jYWgvRgeM/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAMFyvFj2SmRN2L_Obz5160UExiWgfk34R-f4FMHVUdH5_zWn%3Dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAMFyvFj2SmRN2L_Obz5160UExiWgfk34R-f4FMHVUdH5_zWn%3Dg%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/CAMFyvFjbNPQv%3DbANNdQ9X-hhb%2BFAcKYSnmBRV0g6xXrP9ccK4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to