Currently the docker module only restarts the container if the name
parameter is specified and the image has changed. Are there plans to also
check if other docker parameters have changed such as env, port and volume?
It is pretty common to pass in configuration information via environment
variables to containers. It would be nice if the Ansible docker modules
realizes docker parameters have changed, then automatically restart the
container.
I don't think volume or port will change often but configuration
information via environment variables will certainly evolve over time.

Aaron

--
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d9292738-d214-4a7e-98ef-c5e40e37d57b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Michael DeHaan at Sep 24, 2014 at 4:17 pm
    There are no plans per se but that doesn't mean it's not a good idea.

    I think it would depend on whether this was easily queryable by docker-py,
    but I imagine it would be.

    If you'd like to work on this, you are welcome, otherwise please file a
    feature request in GitHub so we don't lose track of the idea.

    Thanks!



    On Wed, Sep 24, 2014 at 12:11 PM, Aaron Feng wrote:

    Currently the docker module only restarts the container if the name
    parameter is specified and the image has changed. Are there plans to also
    check if other docker parameters have changed such as env, port and volume?
    It is pretty common to pass in configuration information via environment
    variables to containers. It would be nice if the Ansible docker modules
    realizes docker parameters have changed, then automatically restart the
    container.
    I don't think volume or port will change often but configuration
    information via environment variables will certainly evolve over time.

    Aaron

    --
    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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/ansible-project/d9292738-d214-4a7e-98ef-c5e40e37d57b%40googlegroups.com
    <https://groups.google.com/d/msgid/ansible-project/d9292738-d214-4a7e-98ef-c5e40e37d57b%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 the Google Groups "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzfh2hT9BQHSoU%3DBCPm9m94GP3AOQ-bKScU%3DZcp6yVhrQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Aaron Feng at Oct 1, 2014 at 4:32 pm
    Here's the code change to restart the container if env vars have changed:

    https://github.com/forty9ten/ansible-modules-core/compare/ansible:devel...devel

    Let me know what you think.

    I know in the previous post I also talked about also checking other
    parameters such as volume and port.
    Maybe that can be done as a separate PR. I believe just the environmental
    detection is useful on its own.

    Aaron
    On Wednesday, September 24, 2014 12:17:11 PM UTC-4, Michael DeHaan wrote:

    There are no plans per se but that doesn't mean it's not a good idea.

    I think it would depend on whether this was easily queryable by docker-py,
    but I imagine it would be.

    If you'd like to work on this, you are welcome, otherwise please file a
    feature request in GitHub so we don't lose track of the idea.

    Thanks!




    On Wed, Sep 24, 2014 at 12:11 PM, Aaron Feng <aaron...@gmail.com
    <javascript:>> wrote:
    Currently the docker module only restarts the container if the name
    parameter is specified and the image has changed. Are there plans to also
    check if other docker parameters have changed such as env, port and volume?
    It is pretty common to pass in configuration information via environment
    variables to containers. It would be nice if the Ansible docker modules
    realizes docker parameters have changed, then automatically restart the
    container.
    I don't think volume or port will change often but configuration
    information via environment variables will certainly evolve over time.

    Aaron

    --
    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 ansible-proje...@googlegroups.com <javascript:>.
    To post to this group, send email to ansible...@googlegroups.com
    <javascript:>.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/ansible-project/d9292738-d214-4a7e-98ef-c5e40e37d57b%40googlegroups.com
    <https://groups.google.com/d/msgid/ansible-project/d9292738-d214-4a7e-98ef-c5e40e37d57b%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 the Google Groups "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/034ad05c-de40-43d1-b219-51304539dc3c%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Vasco Figueira at Oct 2, 2014 at 11:17 am
    Hi Aron,
    On Wednesday, 24 September 2014 17:11:37 UTC+1, Aaron Feng wrote:

    Currently the docker module only restarts the container if the name
    parameter is specified and the image has changed.
    Does that mean you do not experience
    https://github.com/ansible/ansible-modules-core/issues/27 ?

    Thanks

    --
    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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/af0a9a56-a751-400b-956c-727d210c1743%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Aaron Feng at Oct 2, 2014 at 12:39 pm
    Hi Vasco,
    Does that mean you do not experience
    https://github.com/ansible/ansible-modules-core/issues/27 ?
    The issue I'm trying to tackle is slightly different than yours. My
    image:tag has not changed (ie, not using latest but actual version
    tag) but some other Docker parameters have changed within Ansible
    playbook. The code patch above only currently handles environment
    variables, but I plan to also handle port and volumes sometime today.

    The issue you reference is also what I have been seeing, but it is not
    an issue for me because the tag and image are being changed at the
    same time.

    Aaron

    --
    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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAAY8dGzM_nqXV8m4p59W8ANHEoX_POCHiUDESCeRSpDJDLj5%2Bg%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Michael DeHaan at Oct 2, 2014 at 8:51 pm
    Just a note - please send in a PR if you have something, if you just send
    me the diff on your branch and master, we won't have it in the list.



    On Thu, Oct 2, 2014 at 8:39 AM, Aaron Feng wrote:

    Hi Vasco,
    Does that mean you do not experience
    https://github.com/ansible/ansible-modules-core/issues/27 ?
    The issue I'm trying to tackle is slightly different than yours. My
    image:tag has not changed (ie, not using latest but actual version
    tag) but some other Docker parameters have changed within Ansible
    playbook. The code patch above only currently handles environment
    variables, but I plan to also handle port and volumes sometime today.

    The issue you reference is also what I have been seeing, but it is not
    an issue for me because the tag and image are being changed at the
    same time.

    Aaron

    --
    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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/ansible-project/CAAY8dGzM_nqXV8m4p59W8ANHEoX_POCHiUDESCeRSpDJDLj5%2Bg%40mail.gmail.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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgw4WCFYwf7dgM%2BTA%2BF6ce4jKYZkjYJEDSS0j090mKa3SA%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Aaron Feng at Oct 2, 2014 at 9:54 pm
    Understood. I'm still working on it. I will definitely send PR when I am
    ready.

    Aaron
    On Thursday, October 2, 2014, Michael DeHaan wrote:

    Just a note - please send in a PR if you have something, if you just send
    me the diff on your branch and master, we won't have it in the list.




    On Thu, Oct 2, 2014 at 8:39 AM, Aaron Feng <aaron.feng@gmail.com
    wrote:
    Hi Vasco,
    Does that mean you do not experience
    https://github.com/ansible/ansible-modules-core/issues/27 ?
    The issue I'm trying to tackle is slightly different than yours. My
    image:tag has not changed (ie, not using latest but actual version
    tag) but some other Docker parameters have changed within Ansible
    playbook. The code patch above only currently handles environment
    variables, but I plan to also handle port and volumes sometime today.

    The issue you reference is also what I have been seeing, but it is not
    an issue for me because the tag and image are being changed at the
    same time.

    Aaron

    --
    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 ansible-project+unsubscribe@googlegroups.com
    <javascript:_e(%7B%7D,'cvml','ansible-project%2bunsubscribe@googlegroups.com');>
    .
    To post to this group, send email to ansible-project@googlegroups.com
    <javascript:_e(%7B%7D,'cvml','ansible-project@googlegroups.com');>.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/ansible-project/CAAY8dGzM_nqXV8m4p59W8ANHEoX_POCHiUDESCeRSpDJDLj5%2Bg%40mail.gmail.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 ansible-project+unsubscribe@googlegroups.com
    <javascript:_e(%7B%7D,'cvml','ansible-project%2bunsubscribe@googlegroups.com');>
    .
    To post to this group, send email to ansible-project@googlegroups.com
    <javascript:_e(%7B%7D,'cvml','ansible-project@googlegroups.com');>.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgw4WCFYwf7dgM%2BTA%2BF6ce4jKYZkjYJEDSS0j090mKa3SA%40mail.gmail.com
    <https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgw4WCFYwf7dgM%2BTA%2BF6ce4jKYZkjYJEDSS0j090mKa3SA%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 ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAAY8dGwiwOxk7McOhDLRMYu7f-e1oyR1O2LvdVVCYxZGBgR-%3Dg%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupansible-project @
postedSep 24, '14 at 4:12p
activeOct 2, '14 at 9:54p
posts7
users3

People

Translate

site design / logo © 2022 Grokbase