Well, for me a while ago I was sure it was restarting

What I found at the code at the time is, when pull was set to true or
always ( can't remember, at my phone) it set the task to changed.

This behavior is different from the old module, that only changed when a
new image was downloaded.

Em Qua, 14 de set de 2016 15:02, Guy Knights <[email protected]>
escreveu:

> I pulled the latest stable-2.1 commits and after some more testing I've
> discovered that Ansible isn't actually restarting the containers, but was
> reporting that the task changed even though nothing changed. There was a
> small period of time I was running and re-running it where it seemed to
> settle down and stop reporting that the task changed, but I just tried it a
> couple of times and it's started doing it again.
>
> On Tue, Sep 13, 2016 at 10:49 AM, Bryan Hiestand <[email protected]>
> wrote:
>
>> I have also been having this issue, but haven't dug deeper at this point.
>>
>> On Monday, September 12, 2016 at 5:25:00 PM UTC-7, Guy Knights wrote:
>>>
>>> It's been a while but I figured I'd bump this to see if anyone has any
>>> insight into my question above about why ansible insists on restarting
>>> containers even though the task config hasn't changed.
>>>
>>> On Wednesday, 29 June 2016 10:01:08 UTC-7, Guy Knights wrote:
>>>>
>>>> Ok, I changed this to use docker_container and it seems to be working
>>>> ok now.
>>>>
>>>> One thing I am curious about though, is that every time this task runs
>>>> it registers as 'changed' even though the restart policy is explicitly set
>>>> to 'no'. None of the module arguments have changed between runs, so is
>>>> there a valid reason why this is happening?
>>>>
>>>> Thanks,
>>>> Guy
>>>>
>>>> On Tue, Jun 28, 2016 at 4:32 PM, Guy Knights <[email protected]>
>>>> wrote:
>>>>
>>>>> Hmm, no that didn't fix it for me unfortunately. I updated the
>>>>> docker-engine package to the latest and also pulled the latest ansible
>>>>> stable-2.1 commits, but it still fails with the same error. I'll try
>>>>> changing over to the new docker_container module instead and see if that
>>>>> fixes it for me.
>>>>>
>>>>> Thanks anyway!
>>>>> Guy
>>>>>
>>>>> On Wed, Jun 22, 2016 at 11:42 AM, Henrique Santos Fernandes <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hello Guy,
>>>>>>
>>>>>> Have you updated you docker server?
>>>>>> I am not sure, but i had the same problem now! and I just updated
>>>>>> some one else pull requets that should solve it:
>>>>>> https://github.com/ansible/ansible-modules-core/pull/4015
>>>>>>
>>>>>> But with older ansible, it did not showed an error, it just reloaded
>>>>>> the container, i havent looked into it. I know it reloads when it should
>>>>>> not, like it is reloading for a container that did not change, eitherway,
>>>>>> the PR make it run again.
>>>>>> If you have Labels at the Dockerfile, the container will restart if
>>>>>> you did not add them to the ansible task. Not sure if this should be the
>>>>>> behavior, but it is.
>>>>>>
>>>>>> Also i think ansible 2.2 will not have this issue, as it is
>>>>>> deprecating the docker module and using a newer one.
>>>>>>
>>>>>> Hope that helps!
>>>>>>
>>>>>>
>>>>>> Em terça-feira, 21 de junho de 2016 21:20:40 UTC-3, Guy Knights
>>>>>> escreveu:
>>>>>>>
>>>>>>> Hi Johannes,
>>>>>>>
>>>>>>> It's a git clone of the stable-2.1 branch. I recently (like, today)
>>>>>>> did a 'git pull' in addition to 'git submodule update --recursive' and
>>>>>>> tried again, still got the same error.
>>>>>>>
>>>>>>> I just tried switching back to the stable-2.0.0.1 branch and it
>>>>>>> seems to be working fine, so it appears to be a specific 2.1 issue.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Guy
>>>>>>>
>>>>>>> On Thursday, June 2, 2016 at 1:31:56 AM UTC-7, Johannes Kastl wrote:
>>>>>>>>
>>>>>>>> On 31.05.16 21:23 Guy Knights wrote:
>>>>>>>>
>>>>>>>> > I only started getting this recently after I started using
>>>>>>>> ansible 2.1. The
>>>>>>>> > docker task in question hasn't been modified in a long time, and
>>>>>>>> if I
>>>>>>>> > manually remove the container from the host and re-run the
>>>>>>>> playbook, it
>>>>>>>> > starts the container ok.
>>>>>>>>
>>>>>>>> How did you install ansible 2.1? Recently there was an error
>>>>>>>> because
>>>>>>>> some git submodules were not up to date and caused problems...
>>>>>>>>
>>>>>>>> Johannes
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>> 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/1UTB7O5ZvpE/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/35c5b979-55e5-497f-8ec2-188890a2346a%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/ansible-project/35c5b979-55e5-497f-8ec2-188890a2346a%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/1UTB7O5ZvpE/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/0c1f8926-9323-4dd5-ab43-c6c0ea92e3a2%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/0c1f8926-9323-4dd5-ab43-c6c0ea92e3a2%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/1UTB7O5ZvpE/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/CANNH9msj0eRQLxdtvE0rmYup8NCN7BYaoc1MCLv2CCzRFhmKdQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CANNH9msj0eRQLxdtvE0rmYup8NCN7BYaoc1MCLv2CCzRFhmKdQ%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/CAJpZ0xUt7g8BzQ9CdiT1kTHGUa5kvE-Q1oCTJvU2gveoRbMQgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to