Commit Graph

274 Commits (c0c5b9a50a304acaaa471e32623939408a6c587c)

Author SHA1 Message Date
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