Sharp Hall
3935cce394
docker: Allow publishing of ports with the same number but different protocol ( #38412 )
...
* Don't deduplicate docker container ports with different protocols
* Test _parse_exposed_ports
2018-06-15 12:36:20 -04:00
Ben Berry
32c191ee9c
expand user before calling abspath ( #40196 )
...
* expand user before calling abspath
* omit expanduser code smell check for volumes
2018-06-13 21:18:02 -04:00
Thierry BOUVET
8b9fe42c72
Add new module to create/update a docker swarm. ( #38280 )
...
* Add new module to create/update a docker swarm.
* Fix ansible-test sanity
* Fix requirements
* Fix requirements
* Add tag for author
* Test integration test.
* Fix main.yml
* Add linux arch
* Add template
* Fix test result
* Integration test to create/remove a swarm manager
* fix join test
* Downgrade docker-py
* fix rhel
* Fix review documentation.
* Fix whitespace
* Check docker installation.
* test docker install
* check
* Remove docker socket
* Fix docker install
* Fix sanity test
* Rebase
* Add docker_swarm maintainer
* Fix review
* Fix new version.
* Add docker default values
* Fix description.
* Reworked documentation
* Fix YAML error
* Rebase
* Fix example for update state.
* Fix idempotent states. Fix states: present/absent.
* Fix sanity
* Fix variables sanity
* Update example for absent state.
* fix sanity
* Wrap the contents of error message in to_native.
Co-authored by: Dag Wieers <dag@wieers.com>
2018-06-08 10:45:09 -04:00
Clint Byrum
6635748c8f
Enable check mode for docker_image_facts ( #38944 )
...
This module never changes anything. As such, there is no reason not to
just enable check mode.
2018-06-06 11:03:26 +02:00
Achintha Gunasekara
d98c892017
Adding a switch to output docker logs ( #40693 )
...
* Adding a switch to print logs
* Update to docs
* Adding `version_added` for the new option
* Updating version added
* Moving `output_logs` before `paued` for alphabetically ordering.
2018-06-06 10:50:04 +02:00
Suzuki Shunsuke
38c86b7eef
Add 'init' option to docker_container module to support docker's `--init` option ( #34547 )
...
* Add support for `--init` option to `docker_container` module
Fixes #30761
* Validate docker API's version when docker_container's init option is True
https://github.com/ansible/ansible/pull/34547#pullrequestreview-122355244
https://docs.docker.com/engine/reference/commandline/run/#options
init option requires docker API 1.25+ .
* Fix failure of sanity test
2018-05-24 12:55:16 -05:00
Matt Clay
8deced3e04
Fix shebangs and file modes and update tests. ( #40563 )
...
* Add execute bit sanity test and apply fixes.
* Add shebang test for `lib` dirs and apply fixes.
* Shebang and execute bit cleanup.
2018-05-22 14:25:36 -07:00
Alberto Murillo
0f3480d359
docker_image: Fix idempotency of pull ( #31956 )
...
when pulling an image with force=yes the task was marked as changed
everytime even when the image hasn't changed.
This was due to a bad comparison of the image tag before the pull
and after the pull.
Fixes #22596
Signed-off-by: Alberto Murillo <albertomurillosilva@gmail.com>
2018-04-25 12:58:29 -04:00
jctanner
2f32e0ba2d
Remove me from botmeta ( #39263 )
...
* Remove myself from team_vmware
* Remove myself from maintainership of all modules
2018-04-24 19:55:04 -04:00
Thierry BOUVET
4117b2dd29
Fix documentation fragments for docker ( #38378 )
2018-04-17 08:51:56 -07:00
Matt Martz
897c8df8d0
Ensure the MAC address uses colons instead of hyphens for later comparison. Fixes #35463 ( #35465 )
2018-03-27 15:20:01 -04:00
Dag Wieers
cdd21e2170
Clean up module documentation ( #36909 )
...
* Clean up module documentation
This PR includes:
- Removal of `default: None` (and variations)
- Removal of `required: false`
- Fixing booleans and `type: bool` where required
* Fix remaining (new) validation issues
2018-03-15 22:15:24 +01:00
skylerbunny
d984afa5ba
Add compatibility for docker-py version 3 ( #36973 )
2018-03-06 07:14:31 -05:00
Joni Salmi
ff0f6286d7
Docker service update project_name doc ( #36713 )
...
```
FAILED! => {"changed": false, "msg": "Parameter error - project_name required when providing definition."}
```
2018-02-26 08:25:50 -05:00
Abhijeet Kasurde
4cc7af7372
docker_login: Hide password from response ( #34491 )
...
Fixes : #32869
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:41:54 +05:30
Michael Nugent
d212ca11b3
False matches the docs and intentions of the previous developer ( #35762 )
2018-02-15 15:40:10 -05:00
John R Barker
a23c95023b
Module deprecation: docs, scheme and tests ( #34100 )
...
Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.
* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index
To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
removed_module()
```
2018-01-30 12:23:52 +00:00
Michael
75130b4a4d
Support domainname in docker_containers ( #32292 )
2018-01-23 08:24:37 -06:00
Yury Tsarev
7c8120d0de
Fix misleading cleanup/detach documentation ( #34674 )
...
* Fix misleading cleanup/detach documentation
Current documentation is not concrete regarding desired
state of `detach` to make container be properly removed
with `cleanup`
Make `detach:false` be mentioned explicitly
* Tweak formatting
2018-01-10 15:33:22 +00:00
John Barker
c57a7f05e1
Bulk autopep8 (modules)
...
As agreed in 2017-12-07 Core meeting bulk fix pep8 issues
Generated using:
autopep8 1.3.3 (pycodestyle: 2.3.1)
autopep8 -r --max-line-length 160 --in-place --ignore E305,E402,E722,E741 lib/ansible/modules
Manually fix issues that autopep8 has introduced
2017-12-07 20:25:55 +00:00
Nicolas DOUILLET
4b4c1fdb13
Fix memory_reservation typo in docker_container module ( #33375 )
2017-11-29 19:01:49 -05:00
Harris Dimitriou
9e9f2b9ad5
Added userns support on docker_container module Fixes #20648 ( #22195 )
...
* added userns support on docker_container module
* Fixes #20648 - changed 'version_added' of userns_mode to 2.3 from 2.2
* version_added 2.5
2017-11-28 16:54:19 +00:00
Dag Wieers
9d156c6cb1
docker: PEP8 compliancy and documentation changes ( #32628 )
...
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-11-07 15:35:50 +01:00
UnderwayNYC
11faafcbf7
Fix error when there are no docker volumes present yet ( #28145 )
...
* Fix error when there are no docker volumes present yet
* fixes suggested by Shippable
2017-10-30 15:53:08 -04:00
Kenny Gillen
1234a79349
Fix gender pronouns and the odd typo ( #31709 )
2017-10-13 13:52:38 -04:00
Toshio Kuratomi
75eed6a51a
Port arg specs from type='str' to type='path'
2017-10-09 21:15:56 -07:00
François Scala
aade5234a9
Fix urlparse import for Python3 ( #31240 )
...
* Fix urlparse import for Python3 in
* contrib/inventory/consul_io.py
* contrib/inventory/rudder.py
* contrib/inventory/windows_azure.py
* lib/ansible/module_utils/known_hosts.py
* lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py
* lib/ansible/modules/cloud/docker/_docker.py
* lib/ansible/modules/cloud/ovirt/ovirt_disk.py
* lib/ansible/plugins/action/ce_template.py
2017-10-09 20:18:09 -07:00
John R Barker
e859d0da9c
data should be redacted in docker_secret ( #31366 )
2017-10-05 14:07:23 -04:00
Andrew Lihonosov
4c0889e8fc
docker_service build command respects the "pull: no" parameter
...
Fixes #30296 .
2017-10-02 11:11:48 -04:00
Artem Bolshakov
fb4d065654
Fix running docker container with not readable logging driver. Fixes #27278
2017-10-02 11:00:16 -04:00
Sebastien Boyron
cb5f2c7ac3
[fix] issue #29886 - it misses oom_killer in host_config_params ( #30712 )
...
so it was never passed to docker API.
2017-09-25 20:42:02 -04:00
Sebastien Boyron
901bc2cffe
Clean code, fd.close not required since open as fd if used; remove get_redirected_output from cleanup_redirection_tempfiles since output is not used
...
(cherry picked from commit ef51f00bbc9f24485915040b863c9d034d3c272c)
2017-09-21 20:01:13 -07:00
Toshio Kuratomi
f66c74915c
Fix docker_service python3 incompatibility
...
Looks like this is supposed to operate on native strings so there's no
need to encode or decode at all here
Fixes #30354
2017-09-21 19:50:54 -07:00
Abdul Anshad A
272c0ce68c
fixes #5732 - Add support for using network ID ( #22503 )
2017-08-30 17:32:45 -04:00
Stephen Jennings
be2d4cc1c9
Check for an existing docker_network before trying to modify it ( #24048 )
...
This eliminates a TypeError in check mode.
2017-08-23 12:10:53 -04:00
Jun Guo
655667527d
[docker] Fix ignore_image option not work issue. ( #19039 )
...
Currently the ignore_image option can be set, but can not work as it is
descripted in document. The reason is the code will check the difference
of configurations between current container and target image, and it
will mark the `different` to `True` when the image is different even we
set `ignore_image=true`, that will cause the container being re-create.
2017-08-17 13:47:52 -04:00
Alvaro Aleman
f8e79eb481
Fix changed event for docker_image in force mode
2017-08-17 10:42:09 -04:00
Toshio Kuratomi
f203ca7907
Update metadata to 1.1
2017-08-15 23:12:08 -07:00
Abhijeet Kasurde
e419a55c71
Add correct URL for docker guide ( #27465 )
...
Fixes : #27463
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-07-30 10:08:43 +01:00
Toshio Kuratomi
1ee08c0f06
Get rid of more wildcard imports and add boilerplate to more modules
...
This commit cleans up the following module categories:
* messaging
* inventory
* crypto
* commands
* clustering
* cloud/webfaction
* cloud/docker
* cloud/digital_ocean
2017-07-29 07:02:12 -07:00
Toshio Kuratomi
225fa5d092
Fix undefined variables, basestring usage, and some associated python3 issues
2017-07-25 15:58:23 -07:00
Toshio Kuratomi
df15583ad0
Promulgate house's fix for docker_volume to docker_secret
...
* Revert change to docker_common as it's not as good as the try: except fix
* limit docker_volume fix to ImportErrors
* fix docker_secret i nthe same way
* Remove docker_secret from import tests
2017-07-19 13:20:47 -07:00
Chris Houseknecht
2e073e73d2
Fixes doc string in docker_volume ( #27074 )
2017-07-19 15:42:31 -04:00
Alex Grönholm
657ab58139
Added the docker_volume module ( #24957 )
...
* Added the docker_volume module
* Code style fixes
* Added yours truly to the copyright statement
* Added documentation link
* Fixed YAML syntax in documentation string
* Documentation style fixes based on the code review
* Implemented requested code corrections
* Added documentation for the "labels" option
* Handled APIErrors from docker-py
* Fixed the type of the "labels" option (dict -> list)
* Fixed typo
* Import APIError from docker_common, not from docker-py
2017-07-19 13:43:54 -04:00
Will Medlar
3f67d167fe
[ Fixes #26690 ] Supports Python 3 handling of base64 encoding ( #26876 )
...
* [Fixes #26690 ] Supports Python 3 handling of base64 encoding
* Set text auth to separate variable for reuse
2017-07-17 21:11:52 -07:00
Chris Houseknecht
6af53cf0ef
Adds docker_secret module ( #26469 )
2017-07-06 09:22:04 -04:00
Chris Houseknecht
8765eadb30
Fixes list comparison ( #26042 )
2017-06-26 11:06:57 -04:00
Will Rouesnel
42b608db0c
Add support for tmpfs to docker_container. ( #25747 )
2017-06-23 08:03:28 -04:00
Matthew Schick
846174b4ba
Update nocache to be the proper bool type instead of string ( #24358 )
...
* Update nocache to be the proper bool type instead of string
* Add proper bool type for params
2017-06-19 11:24:19 +01:00
Chris Houseknecht
20bddde669
docker_service: Forward stderr-based output from docker-compose ( #25456 )
...
PR #5165 at https://github.com/ansible/ansible-modules-core/pull/5165
adds redirection and capture of stdout during execution of
docker-compose.
This doesn't necessarily catch all errors, since some are printed to
stderr and lost.
This extends the redirection to include stderr, and does minor string
processing to attempt to find a 'useful' message to present as the
final Ansible error.
2017-06-07 23:30:26 -04:00