Hi all!
I've found, that if run such command:
- docker: image=registry state=running
And then:
- docker: image=registry state=runningenv="SOMEVAR=1"
The module will return "ok", not "changed" and docker container will not
be relaunched with new parameters.
At first sight it may seem like this problem can be easily resolved by
introducing some check in the module.
But if we think better we will find at least two problems:
1) What the module should do with a container that was launched with
old parameters?
2) docker run registry -e "SOMEVAR=1" is a different call from just
docker run registry, but the only way to inspect what environment
variables in a container (AFAIK) is docker inspect -f "{{
.Config.Env }}" our_container and there will be some default
environment variables as HOME. And also we need to ensure that there
is no stale user-defined environment variables. So I don't see any
straight-forward ways to check if a container was launched with
exact environment variables as defined in current version of playbook.
I want to discuss, what is the best way to make this module operate
fully in idempotent fashion.
--
With kind regards, Andrew Pashkin.
cell phone - +7 (985) 898 57 59
Skype - waves_in_fluids
e-mail - andrew.pash...@gmx.co.uk
--
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+unsubscr...@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/541810FD.6030907%40gmx.co.uk.
For more options, visit https://groups.google.com/d/optout.