Ian Babrou
9ecfde7551
not triggering reload for links and not string env variables
10 years ago
Ash Wilson
0969fd75c8
Use {0}, {1} style format indices for 2.6 compat
10 years ago
Ash Wilson
19664a96db
Expect module env vars to override Dockerfile ones.
10 years ago
Ash Wilson
608ddbea29
Include bind mounts in VOLUMES check.
10 years ago
Ash Wilson
2c58eb3845
Exposed ports, env vars, volumes from the image.
...
This will account for settings that are provided by the hierarchy of
Dockerfiles used to construct your image, rather than only accounting
for settings provided to the module directly.
10 years ago
Ash Wilson
79db475316
Full image inspection and just repo tags
...
Hat tip to @bobrik.
10 years ago
Brian Coca
1c0623ab8d
Merge pull request #890 from SamYaple/docker-pid-support
...
Add pid mode support to docker module
10 years ago
Ash Wilson
d046425049
Connect to Docker with optional TLS.
10 years ago
Ash Wilson
80aca4b936
Rework docker module states.
...
Organize each state into a distinct function for readability and composability.
Rework `present` to create but not start containers. Add a `restarted` state
to unconditionally restart a container and a `reloaded` state to restart a
container if and only if its configuration is incorrect. Store our most recent
knowledge about container states in a ContainerSet object. Improve the value
registered by this task to include not only the inspect data from any changed
containers, but also action counters in their native form, a summary message
for all actions taken, and a `reload_reasons` key to store a human-readable
diagnostic to determine why each container was reloaded.
10 years ago
Ash Wilson
7490223940
Pull newer image versions when requested.
10 years ago
Ash Wilson
fedbea682e
Another documentation commit.
10 years ago
Sam Yaple
e1e74bdf33
Updated version and fixed default
10 years ago
Sam Yaple
74e922449b
Add pid mode support to docker module
...
This allows setting the pid namespace for a container. Currently only
the 'host' pid namespace is supported.
This requires Docker 1.4.1 and docker-py 1.0.0
10 years ago
Brian Coca
d2158708ff
undeprecated docker_image until replacement actually arives
10 years ago
Brian Coca
b787792908
Merge pull request #679 from marqc/fix_dns_create_container_issue
...
Fixes docker.errors.DockerException: 'dns' parameter has no effect on create_container()...
10 years ago
Brian Coca
7e71121da5
Merge pull request #730 from SergeyZh/devel
...
Fixed broken volumes_from for client API >= 1.10
10 years ago
Tomer Paz
374dd06c8e
resolve issue 764
...
https://github.com/ansible/ansible-modules-core/issues/764
added 'domainname' attribute in addition to existing 'hostname'.
That's the most elegant way to delegate domain name to docker-py...
10 years ago
Sergey Zhukov
7baaf97a8b
Fixed broken volumes_from for client API >= 1.10
10 years ago
Toshio Kuratomi
670098af2d
Spelling and grammar fix
10 years ago
calmera
d2c6791082
Update docker.py
...
Added some more documentation for the memory_limit and volume options.
10 years ago
Brian Coca
d66c3fcf51
moved defaulting to module constant to after when it is defined
10 years ago
Marek Chodor
13685fb91b
Fixes docker.errors.DockerException: 'dns' parameter has no effect on create_container(). It has been moved to start()
10 years ago
Lorin Hochstein
48ce8bb564
Don't pass volumes_from to create_container
...
Don't pass the volumes_from argument to the Docker create_container method.
If the volumes_from argument is passed to the create_container method, Docker
raises the following exception:
docker.errors.DockerException: 'volumes_from' parameter has no effect on
create_container(). It has been moved to start()
10 years ago
Lorin Hochstein
3665c92856
docker: fix volume[s]_from typo
...
Code makes reference to volume_from instead of volumes_from. If volumes_from is
passed as an argument, generates a KeyError.
10 years ago
Jan Weitz
ebf9b8c6e2
Fixes invalid dictionary access.
10 years ago
Jan Weitz
82601fdc54
Fixes version check for docker-py
10 years ago
Stefan Junker
8f3b5c640b
Fix bind-volumes on docker >= 1.4.0
...
If bind-volumes are submitted to docker >= 1.4.0 with the volumes set in addition to the binds, docker will create a regular volume and not bind-mount the specified path.
10 years ago
Toshio Kuratomi
c4f9366e91
Newstyle class
10 years ago
Toshio Kuratomi
f65d9ab793
Make insecure_registry feature version check against the client API
10 years ago
Maksim Losev
4172d445d3
Add insecure_registry to docker-py pull method
...
Starting from docker-py>=0.5.0 it is impossible to work with private registries based on HTTP.
So we need additional parameter to allow pull from insecure registry
Related to ansible/ansible#9111
10 years ago
Toshio Kuratomi
fa0fa9d221
Make docker ver checks issue failures rather than silently ignoring
...
Also:
* make client version checks robust for two digit version pieces and
alpha versions
* consolidate version checking code
10 years ago
Ingo Gottwald
80d45c78a3
Add support for new docker restart policies
10 years ago
PikachuEXE
6ce7e63c5f
~ Add missing documentation for option `email`
10 years ago
Toshio Kuratomi
c6522620c5
Clean up the docker module just a little so that we can unittest the get_split_image_tag function
10 years ago
Michael DeHaan
2970b339eb
Deprecate docker_image, use the docker module to deploy docker images, or shell out to docker to call
...
docker build if you want from a playbook.
10 years ago
Brian Coca
19ed60196c
added __init__.py to new cloud subcategories so builds work again
10 years ago
Brian Coca
0c4adcb2c6
made subcategories for cloud modules for better organization
10 years ago
Michael DeHaan
c8e1a2077e
file extensions!
10 years ago
Michael DeHaan
417309a626
Restructuring.
10 years ago
Michael DeHaan
73123b69fa
Move modules into subdirectory.
10 years ago
James Cammarata
2fac1fd865
Ensure port in docker expose list is a string
...
Fixes #8731
10 years ago
Toshio Kuratomi
3f4bdce67e
My fix was wrong again. Base this try off of @mantiz's fix in #9016
10 years ago
Toshio Kuratomi
e51bcf90a0
Fix the case where a docker image is not part of a namespace.
...
Fixes #9016
10 years ago
Toshio Kuratomi
4094edf92f
Fix splitting the tag from the image name
...
Fixes #8983
10 years ago
Toshio Kuratomi
732b6f0a23
Omit tag from parsed image name
...
Fixes #8925
10 years ago
James Cammarata
fa21b336f8
Stop/remove existing docker container if the specified tag is different
...
Fixes #8278
10 years ago
Eric D. White
6f9cb7ab61
Issue 8735 - module docker - expose values should be striped to ensure port forwarding works.
10 years ago
James Cammarata
3373e82d83
Fixing bug with image/tag pulling in docker module
...
Fixes #8670
10 years ago
James Cammarata
d6375cd3c1
Fix bad commit from #8095 and fix bad splitting on :'s in the image
...
Fixes #8095
Fixes #8658
10 years ago
James Cammarata
f729ab8e67
Make env param a dict type instead of list
...
Also modifies param type checking code to remove whitespace from
around params before splitting them into k=v pairs.
Fixes #8199
10 years ago
James Cammarata
f367adc021
Update version_added field for docker_api_version param
10 years ago
James Cammarata
30ead6a17c
Merge branch 'add-docker-api-version-parameter' of https://github.com/jmoretti/ansible into jmoretti-add-docker-api-version-parameter
10 years ago
James Cammarata
74847bfbfa
Merge branch 'devel' of https://github.com/kolloch/ansible into kolloch-devel
10 years ago
James Cammarata
aa0a904b2b
Updating version_added for docker net param and adding an example
10 years ago
James Cammarata
a9b6d5a516
Merge branch 'docker-add-net-parameter' of https://github.com/discordianfish/ansible into discordianfish-docker-add-net-parameter
10 years ago
James Cammarata
18618b47b0
Merge branch 'fixes/docker-volumes' of https://github.com/devpopol/ansible into devpopol-fixes/docker-volumes
10 years ago
Kurt Yoder
2f74c0bade
Fix Docker image name parsing
...
Fixes #8357
10 years ago
Joe Moretti
ca7498aeb7
Add optional docker_api_version parameter to Docker Module
10 years ago
Peter Kolloch
0f67a94820
Hack to fix #7738 : Allow tag in image parameter of docker module
...
It also defaults to the "latest" tag for pulling the image
instead of pulling all versions.
11 years ago
Paul Myjavec
267d107fe6
Docker links and required alias
...
If no alias is passed one will now be created for you with the same name
as the target link container, as per the documentation
11 years ago
Johannes 'fish' Ziemke
b16cad7cd9
Add networking mode parameter (net) to docker
...
Since 0.11 Docker supports different networking modes (see docker run
--net). This commit add support for that to the ansible docker module.
This depends on
2d58351164
11 years ago
Stephen Paul Suarez
834168f17b
fix spacing
11 years ago
Stephen Paul Suarez
bb0a56ad1d
fix typo
11 years ago
Stephen Paul Suarez
6b84f7093f
support rw bind mode in docker module
11 years ago
Matt Bray
901feb91fc
docker: fix targetting images by name
11 years ago
James Cammarata
8622a3f396
Merge pull request #7404 from jimi-c/issue_7363_docker_names
...
Make sure the docker data has a "Names" field before using it
11 years ago
Konstantin Shabanov
f9e6db7886
Fix env splitting in docker module
...
ENV variable value could contain '=' (for example mysql://host/db?pool=10)
11 years ago
James Cammarata
b59e4e8222
Make sure the docker data has a "Names" field before using it
...
Fixes #7363
11 years ago
Johannes 'fish' Ziemke
ac14a016c4
Fix: Remove check for Ghost state
...
This fixed the just committed change handling non existent Ghost state.
11 years ago
James Cammarata
b5ba1c4527
Merge pull request #7338 from discordianfish/remove-ghost-state
...
Remove check for Ghost state
11 years ago
Johannes 'fish' Ziemke
dccf70ec0b
Remove check for Ghost state
...
This doesn't exist anymore and causes ansible to throw a KeyError
11 years ago
James Cammarata
4e7542315c
Merge pull request #7110 from orgoj/docker-patch-version_comment
...
module docker - add docker version comment
11 years ago
James Cammarata
98d949e143
Merge pull request #7047 from joshuaconner/docker_bugfix_exclude_entrypoint_from_command_check
...
docker: exclude 'entrypoint' from comparing 'command' param with containers
11 years ago
James Cammarata
f068a4f26a
Merge pull request #6991 from joshuaconner/bugfix_dont_send_wrong_params_to_dockerclient_start
...
Docker: don't send wrong parameters to client.start()
11 years ago
Michael Heca
ae8b942e4a
module docker - add docker version comment
...
Default docker version 0.9.1 from Ubuntu 14.04 LTS don't report APIVersion.
11 years ago
CaptTofu
45d2cab30c
Small bug - 'acts' should be 'facts'
11 years ago
Joshua Conner
0ce43d6e3c
docker: exclude 'entrypoint' from comparing 'command' param with containers
...
The JSON the Docker API returns includes the container's ENTRYPOINT value (if it has one) with the 'Command' value. So instead of checking if `container['Command'] == module.params['command']`, we just check that `container['Command'].endswith(module.params['command'])` so the entrypoint won't affect a container being properly classified as matching the module params or not.
Also I refactored a super-long `if` statement into some temporary variables - I did it to help me figure out what was going wrong, and then it makes the code more readable so I kept it.
11 years ago
Joshua Conner
bac2e879b2
docker: send 1.10 params if docker-py is new enough version
11 years ago
Matt Bray
afd0e78f16
docker.client.APIError has moved to docker.errors.APIError
...
see 18d4db09ec
11 years ago
Joshua Conner
6bf75de95c
Docker: don't send wrong parameters to client.start()
...
As part of being updated for the 1.10 API, a couple of parameters were passed to the docker.client.start() command that it doesn't accept. This caused the module to error out if it tried to start any Docker containers. This removes those parameters so the module works again.
11 years ago
Matt Bray
3d20c585a6
docker: from API 1.10 dns and volumes_from should be passed to start()
11 years ago
Michael DeHaan
289b359139
Merge pull request #6486 from discordianfish/docker-module-add-running
...
Rename present to running, add new present state
11 years ago
Joshua Conner
2d9130fc23
docker: use type instead of manually casting strings to lists
11 years ago
Joshua Conner
15eaa859b0
docker bugfixes: trim whitespace around list param elements, handle list params being coerced to int or long type
11 years ago
Matt Bray
a351f40fff
docker: add tty and stdin_open options
...
Useful for development environments. Setting these options to true
allows you to `docker attach` to a docker container started with
ansible.
11 years ago
Johannes 'fish' Ziemke
459a76c0dd
Rename present to running, add new present state
...
The new present state just makes sure that a container exists, not that
it's running, although it get started one creation.
This is very useful for data volumes. This also changes the old
present, now running (default) state to only create the container if
it's not found, otherwise it just get started.
See also discussion on mailinglist:
https://groups.google.com/forum/#!topic/ansible-devel/jB84gdhPzLQ
This closes #6395
11 years ago
Joshua Conner
ad605390cd
docker: add 'version_added' to the appropriate documentation entries
11 years ago
Joshua Conner
758b9603f5
docker: update to docker-py 0.3.0, plus full port binding support, container names, links
11 years ago
Pavel Antonov
a72733ebea
Added modules description and examples
11 years ago
Pavel Antonov
ae99e8860e
Docker supports links and port binding. Added docker_image module
11 years ago
Timur Batyrshin
9ad52632c5
reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 ( #5852 )
11 years ago
Michael DeHaan
cb6f7748d5
All modules should be using /usr/bin/python in the shebang as ansible_python_interpreter processes this (see FAQ).
...
Fixing for standardization purposes.
11 years ago
Michael DeHaan
edc877d6b0
Merge pull request #5133 from joshuaconner/add_docker_max_version_to_docs
...
add supported docker version to docs
11 years ago
Joshua Conner
2c09d829cb
add supported docker version to docs
11 years ago
James Tanner
4f9aadcc07
Addresses #5023 Fix import comments
11 years ago
James Tanner
38edad70ac
Fixes #5023 Convert all modules to use new snippet import pattern
11 years ago
Michael DeHaan
08996d78d6
Add version_added to all modules missing version_added information, the docs formatter will now
...
raise errors when omitted, updated changelog with new modules.
11 years ago
Tom Berger
9344bc175d
Update cloud/docker: if the image name containes a repository, strip it.
...
When using repositories other than the main one at docker.io, the image name contains the repo name (which itself contains ":" as a separator between domain and port). We don't really care about it here, so just get rid of it before looking at the image name.
11 years ago
Cove Schneider
b69fdc270b
Fixes from docker-ansible, update license to be same as other modules
11 years ago
Cove Schneider
729297bce8
update with current fixes from docker-ansible
11 years ago
Cove Schneider
502fe3cf5f
Un-camelcase DockerContainers, rename class to DockerManager().
11 years ago
Cove Schneider
21e31722f9
remove comment about requirements
11 years ago
Cove Schneider
b4cce885e3
add requirements back
11 years ago
Cove Schneider
8f0b3cac51
clean up a few warnings
11 years ago
Cove Schneider
0fc525ff11
add python requirements to docs
11 years ago
Cove Schneider
3859da2a76
add example docs
11 years ago
Cove Schneider
ea3745d7dd
add docker module
11 years ago