-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Conversation
If the DOCKER_HOST environment variable is set, use it instead of socket. This makes it much simpler to use this module with boot2docker on OS X.
Configure docker_image to take connection info from environment variables. Document that docker and docker_image will read connection info from environment variables if present.
Rebased against devel to resolve merge conflict |
cannot get boot2docker to work with ansible without this - please merge! |
Can we change this so that if you specify these in the playbook the playbook values would override what's in the environment or does that still break this use case? |
@abadger I like the idea of only using the environment variable if the user does not explicitly specify a The docker_url parameter has a default value of Consider the following two invocations:
We would want to use the |
Can I be of some assistance with this issue? I can't get ansible to run my docker containers in the current state.. |
@lorin -- sorry, I have too many docker tickets and this one got lost in my queue of tickets. Yes, there is a way to do that. We'd have to change the default value in the argument_spec to a sentinel value. Then in the module code we'd need to set the if any of the values we'd have to merge the values from the environment variable, actually specified in the playbook, and defaults if they weren't in the environment variable and the variable from the playbook was the sentinel value. None is probably the best sentinel value. |
Looks like the env var logic was originally added in #502. |
If the DOCKER_HOST environment variable is set, use environment variables
to configure the docker client.
This makes it much simpler to use this module with boot2docker on OS X.
Fixes #176.