Chris Houseknecht
f33828e753
Cast scale value to int. Fixes #4592 .
2016-12-08 11:25:11 -05:00
Chris Houseknecht
b01af0d747
Make project start and stop error handling more resilient, and improve message text.
2016-12-08 11:25:11 -05:00
Chris Houseknecht
e95f773d96
Set default log_driver to None to prevent config comparison when a log_driver is not specified. Fixes #4600 .
2016-12-08 11:25:03 -05:00
Chris Houseknecht
05303a974d
Purge networks using network name rather than ID. Fixes 4596.
2016-12-08 11:25:03 -05:00
Chris Houseknecht
890c2d04e2
Default restart_retries to None rather than 0. Fixes #4534 .
2016-12-08 11:25:03 -05:00
chouseknecht
964b7ecffa
Fix container labels expected vs actual comparison.
2016-12-08 11:24:54 -05:00
chouseknecht
1b4a3dbc86
Fix doc strings. Use of > was breaking HTML generation on docs site module page.
2016-12-08 11:24:52 -05:00
Linus Arver
8da17b750d
docker_service: fix files/project_files typo
...
The original decision to rename from `project_files' to `files' was in
3a5dd0007634c9d4e379f20cac77c8fd64b67f42.
2016-12-08 11:24:51 -05:00
chouseknecht
fb99277066
Exposing tcp and udp for same port fails. Fixes issue #4354 .
2016-12-08 11:24:51 -05:00
PikachuEXE
fc87dd9650
Allow specifying human readable value for option `memory_limit` again ( #4049 )
2016-12-08 11:24:50 -05:00
chouseknecht
76260d3aa8
Fix network alias and network link comparison. - Using set based comparison was not working consistently - With != operator worked locally but consistently failed on Travis - With 'not in' operator failed locally and on Travis
2016-12-08 11:24:50 -05:00
chouseknecht
433b5e187f
If debug true, include actions and differences in output.
2016-12-08 11:24:50 -05:00
Chris Houseknecht
a8111adcd6
Some post merge clean up: ( #4406 )
...
- Removed required_if.
- Fixed doc strings.
- Removed debug output being appended to actions.
- Put import of basics at bottom to be consistent with other docker modules
- Added 'containers' alias to 'connected' param
- Put facts in ansible_facts.ansible_docker_network
2016-12-08 11:24:50 -05:00
Brian Coca
94486c5c77
doc fix
2016-12-08 11:24:50 -05:00
Chris Houseknecht
af3884f558
Adding docker_network module. ( #4404 )
2016-12-08 11:24:50 -05:00
muxator
16db1d54d1
typo in the documentation of the "state" parameter ( #4353 )
2016-12-08 11:24:48 -05:00
Chris Houseknecht
2514ec5056
Add buildargs parameter to support Dockerfile ARG directive. ( #4349 )
...
* Add buildargs parameter to support Dockerfile ARG directive.
* Fix doc_strings. Doc string for load_path was completely missing.
2016-12-08 11:24:48 -05:00
chouseknecht
f6b126d412
Default repository tag value to tag parameter value or 'latest'.
2016-12-08 11:24:48 -05:00
chouseknecht
3dab1785ba
Always returns changed when state present and name includes :tag.
2016-12-08 11:24:48 -05:00
Chris Houseknecht
1cf9d3e68e
Add *build* to state parameter choices. Updated deprecation message. Will be deprecated in release 2.3. Removed ( #4342 )
...
mention of *tagged* state in the force parameter doc strings. There is no *tagged* state.
2016-12-08 11:24:48 -05:00
chouseknecht
2ea29fee3f
Fix image tag operation. Allows repository in form of repo:tag. If no tag value, defaults to 'latest'.
2016-12-08 11:24:48 -05:00
chouseknecht
0c4da5d3a0
Added implementation of ignore_image, which prevents recreation of containers on image change.
2016-12-08 11:24:47 -05:00
chouseknecht
5992c21c9c
Fix #3670 host IP defaults to 0.0.0.0 ignoriing bridge Host IP option.
2016-12-08 11:24:47 -05:00
chouseknecht
a6bfeea1c4
Improved documentation for returned actions.
2016-12-08 11:24:47 -05:00
chouseknecht
cd7b34547d
When build true call docker-compose build, and add nocache option.
2016-12-08 11:24:47 -05:00
chouseknecht
df09b4f668
Set version_added
2016-12-08 11:24:47 -05:00
chouseknecht
1670d9b030
Add pull option to pull images prior to evaluating service state.
2016-12-08 11:24:47 -05:00
Julien Vey
7ba3ba2da9
Fix Typo in docker_image_facts module
2016-12-08 11:24:46 -05:00
Chris Houseknecht
c91de38322
Entrypoint fails with 'command not found' error.
2016-12-08 11:24:43 -05:00
Chris Houseknecht
7ffa6a43c5
Add push parameter. Let API handle registry authentication check.
2016-12-08 11:24:43 -05:00
Chris Houseknecht
4002caf60e
Fix module failing when no ports are exposed
2016-12-08 11:24:43 -05:00
jjshoe
d8b752b3cf
Fixed a typo ( #4168 )
2016-12-08 11:24:43 -05:00
Chris Houseknecht
030dcccad4
Fix multi-interface port binding.
2016-12-08 11:24:43 -05:00
Chris Houseknecht
bd3e1c77fe
Add cleanup parameter. ( #4144 )
2016-12-08 11:24:43 -05:00
Chris Houseknecht
7515b2d563
Fix 'all' option for published_ports parameter.
2016-12-08 11:24:43 -05:00
Chris Houseknecht
dc496ffeb4
Fix purge_networks
2016-12-08 11:24:43 -05:00
Qi Luo
b86a229b61
Fix getting actual_stdin_open
2016-12-08 11:24:42 -05:00
Rodríguez, Jorge
82c26ad2d7
Do not forcibly push when building, either.
2016-12-08 11:24:39 -05:00
Rodríguez, Jorge
89e8787d65
Don't forcibly push loaded images to registry. Fixes #3763
2016-12-08 11:24:39 -05:00
chouseknecht
3d5f84c528
Fix compose_version error. Check has compose before checking version.
2016-12-08 11:24:38 -05:00
chouseknecht
1e9590ab65
Fix index
2016-12-08 11:24:38 -05:00
chouseknecht
cc053c45ce
Fix ulimit comparison
2016-12-08 11:24:38 -05:00
Hagen Kuehn
320aea77c6
fixed unknown type <type 'list'> error ( #3959 )
2016-12-08 11:24:37 -05:00
chouseknecht
16e7dc4e2e
Remove dns from container create parameters.
2016-12-08 11:24:37 -05:00
chouseknecht
4d51a51ac3
Fix #3945 docker_container detach not waiting on container to execute.
2016-12-08 11:24:37 -05:00
chouseknecht
82436d5519
Fix #3941
2016-12-08 11:24:37 -05:00
Stefan Hajnoczi
7c4a469174
docker_service: make PyYAML requirement explicit
...
The "Developing Modules" documentation states:
Include a minimum of dependencies if possible. If there are
dependencies, document them at the top of the module file, and have
the module raise JSON error messages when the import fails.
When docker_service runs on a remote host without PyYAML it crashes with
ImportError.
This patch raises a JSON error message when import fails, but only if
the PyYAML module is actually used. It's only needed when the
"definition" parameter is given.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2016-12-08 11:24:37 -05:00
chouseknecht
617c230b62
Fix #16211 - only stop/kill running containers
2016-12-08 11:24:36 -05:00
Chris Houseknecht
b5820c7398
Fix #3906 - Enforce required minimum compose version. ( #3925 )
...
* Fix #3906 - Require minimum compose version.
* Fix typo in message text.
2016-12-08 11:24:36 -05:00
Stefan Hajnoczi
38013de366
Stream image data in load_image() to avoid out-of-memory
...
Reading the entire tar file into memory can result in out-of-memory
conditions such as this traceback:
Traceback (most recent call last):
File "/tmp/ansible_YELTSu/ansible_module_docker_image.py", line 486, in load_image
self.client.load_image(image_data)
File "/usr/local/lib/python2.7/dist-packages/docker/api/image.py", line 147, in load_image
res = self._post(self._url("/images/load"), data=data)
...
File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 848, in _send_output
msg += message_body
MemoryError
Luckily docker-py's load_image(), which calls requests post(), accepts a
file-like object instead of a string. Pass in the file object to avoid
reading the full file into memory. This allows larger tar files to load
succesfully.
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
2016-12-08 11:24:36 -05:00
Vince v. Oosten
42a38f9141
move environment variable gathering to end of __init__() ( #3890 )
...
* This moves the lines in the code that parse the `env` and `env_file` options for docker to the end of the `__init__()` function.
This is needed because the `_check_capabilites` function needs both a working `self.client` and a proper `self.docker_py_versioninfo`.
`_check_capabilities` is used by `ensure_capabilities` which is, in turn, used by `get_environment`
This means that before this commit, the environment variables could not be loaded because both `self.client` and `self.docker_py_versioninfo` were not set at that time.
This commit fixes that by putting the environment variable parsing after those two.
* This moves the lines in the code that parse the `env` and `env_file` options for docker to the end of the `__init__()` function.
This is needed because the `_check_capabilites` function needs both a working `self.client` and a proper `self.docker_py_versioninfo`.
`_check_capabilities` is used by `ensure_capabilities` which is, in turn, used by `get_environment`
This means that before this commit, the environment variables could not be loaded because both `self.client` and `self.docker_py_versioninfo` were not set at that time.
This commit fixes that by putting the environment variable parsing after those two.
2016-12-08 11:24:36 -05:00
chouseknecht
fc486824b8
Fix issue #3866
2016-12-08 11:24:35 -05:00
pic
8494b0af4b
fix #3528 : dns type
2016-12-08 11:24:34 -05:00
chouseknecht
9549c66a56
Fix #147 automatically expose published ports
2016-12-08 11:24:34 -05:00
chouseknecht
17fc0f11db
Remove unused method in ContainerManager
2016-12-08 11:24:34 -05:00
Mike Mars
e2dbd0f445
Fixing Docker compile time errors irt exception handling for Python 3
2016-12-08 11:24:34 -05:00
chouseknecht
ec9f56d8e0
Fix #3822 stop container
2016-12-08 11:24:33 -05:00
chouseknecht
c9e4955d38
Remove registery option per #3824 .
2016-12-08 11:24:33 -05:00
chouseknecht
be2d32f04d
Fix upate typo and expected volume compare.
2016-12-08 11:24:33 -05:00
chouseknecht
9dd95efe76
Fixed binds and volumes. Now recognizes bound vs unbound as well as named volumes.
2016-12-08 11:24:33 -05:00
Jirayut 'Dear' Nimsaeng
d373e0a7c4
Fix volume to support not binding volumes to host
2016-12-08 11:24:33 -05:00
chouseknecht
96192ead02
Remove debug/register from examples.
2016-12-08 11:24:33 -05:00
chouseknecht
3d0d14c5ff
Fix network comparison. Fix handling of links. Updated doc strings. Added more examples.
2016-12-08 11:24:33 -05:00
chouseknecht
a4bd558240
Set version added to 2.2 so that tests pass
2016-12-08 11:24:32 -05:00
chouseknecht
e398efb04f
For new options move vesion_added to 2.1.1
2016-12-08 11:24:32 -05:00
chouseknecht
c8f63e867a
Fixed bug in _get_network_id
2016-12-08 11:24:32 -05:00
chouseknecht
a9ddb5023d
Fix doc strings.
2016-12-08 11:24:32 -05:00
chouseknecht
1d327a23cd
Fixed issues post testing.
2016-12-08 11:24:32 -05:00
chouseknecht
39bfb136a7
First pass at implementing networks parameter. Also added purge_networks option to remove container from networks not included in networks param.
2016-12-08 11:24:32 -05:00
chouseknecht
f3c33ee35f
Fix for 3768 - adding support for env_file
2016-12-08 11:24:32 -05:00
chouseknecht
2016911e64
Check self.parameters.env exists.
2016-12-08 11:24:32 -05:00
chouseknecht
bc665fca9c
Fix for issue #3775 - env config comparison
2016-12-08 11:24:32 -05:00
chouseknecht
65e71d8960
Update restart_policy doc strings.
2016-12-08 11:24:32 -05:00
chouseknecht
b5666c0f1c
Fix restart_poicy
2016-12-08 11:24:32 -05:00
chouseknecht
8f9ef1213d
Fix for #3783 - command returns not found or does not exist.
2016-12-08 11:24:32 -05:00
Dan Schmidt
c8ec843ac2
Fix "ansbile_facts" typo in docker_container module
2016-12-08 11:24:32 -05:00
chouseknecht
d0da544aef
Fix for issue 3740. Make docker_service more resilient when targeting older API versions.
2016-12-08 11:24:31 -05:00
Brian Coca
f6690828af
deprecated docker ( #3710 )
...
* deprecated docker
* updated formatting
2016-12-08 11:24:31 -05:00
chouseknecht
afc8c42e57
Fixed the URL in description. It's now valid Yaml.
2016-12-08 11:24:29 -05:00
chouseknecht
f14d675d2a
Remove the U().
2016-12-08 11:24:29 -05:00
chouseknecht
176363052f
Uppercase
2016-12-08 11:24:29 -05:00
chouseknecht
2b4ee0c19d
Make the new bits a NOTE
2016-12-08 11:24:29 -05:00
chouseknecht
4ac31f1e8d
Where to get the full docker picture.
2016-12-08 11:24:29 -05:00
Shubham
8a6237955d
remove module argument, fix #3682 ( #3683 )
2016-12-08 11:24:29 -05:00
Matt Martz
190f24f30e
Revert "Fix doc strings spacing."
...
This reverts commit 127d518011224289f7917fd3b2ec8ddf73c7dd17.
2016-12-08 11:24:28 -05:00
chouseknecht
26392077c0
Fix doc strings spacing.
2016-12-08 11:24:28 -05:00
chouseknecht
8e6d00f28e
Fix doc strings. Missing requirements and doc fragment reference.
2016-12-08 11:24:28 -05:00
chouseknecht
d5b82d67b8
Fail gracefully when build path is not found.
2016-12-08 11:24:27 -05:00
chouseknecht
9a021b4181
Fixed files/project_files naming. Correct name is files.
2016-12-08 11:24:27 -05:00
chouseknecht
5837f744e0
Flip version added back to 2.2 to make tests pass.
2016-12-08 11:24:27 -05:00
chouseknecht
018c2f8f73
Moving version added to 2.1
2016-12-08 11:24:27 -05:00
chouseknecht
e8d49261e3
Added actions to RETURN docs. Show actions when debug or check mode.
2016-12-08 11:24:27 -05:00
chouseknecht
2860f57551
Removed use of --diff. Replaced 'diff' in output with 'actions'. Only show 'actions' in output if debug true.
2016-12-08 11:24:27 -05:00
chouseknecht
be24f83a41
Removed fail method. Combined recreate and force_recreate params.
2016-12-08 11:24:27 -05:00
chouseknecht
50ef604713
Adding docker_service
2016-12-08 11:24:27 -05:00
Chris Houseknecht
8ba5cc4392
Fixed parameters passing in container_create method. ( #3618 )
2016-12-08 11:24:27 -05:00
Brian Coca
c03e1bd2d5
fixed documentation and arg issues
2016-12-08 11:24:26 -05:00
Toshio Kuratomi
ed932a53cd
Fix documentation
2016-12-08 11:24:26 -05:00
John R Barker
d13046a905
ansible-validate-modules part 4: Enable check on ansible-modules-core ( #3526 )
...
* Call ansible-validate-modules
* Correct quotes + add newline
2016-12-08 11:24:26 -05:00
chouseknecht
1d6517489b
Add doc string for container_limits. Fixed push fail message. Use path type.
2016-12-08 11:24:25 -05:00