Commit Graph

200 Commits

Author SHA1 Message Date
Felix Fontein
5a23c4d336
Set minimal Docker API version for chdir to 1.35. (#253) 2021-12-22 17:14:08 +01:00
Felix Fontein
1b9416b572 Release 2.0.2. 2021-12-09 06:03:52 +01:00
Jeff Goldschrafe
d224752cf1
Minor fixes to nsenter connection plugin (#249)
* Minor fixes to nsenter connection plugin

- Ensure the nsoption_pid option is retrieved in _connect instead of
  __init__ to prevent a crasher due to initialization order
- Replace the use of --all-namespaces with specific namespaces to
  support compatibility with Busybox nsenter (for example, Alpine)

* minor tidy

* Fix PEP8 violation

* Changelog fragment

* Update changelogs/fragments/249-nsenter-fixes.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Jeff Goldschrafe <jeff.goldschrafe@flatiron.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-12-09 05:53:43 +01:00
Felix Fontein
699dd4146e Prepare 2.0.2 release. 2021-12-08 20:24:14 +01:00
Felix Fontein
bed775c4ea
docker_container_exec: improve handling of chdir option (#243)
* Only pass chdir on when it is provided, and prevent this option from being used for Docker SDK for Python < 3.0.0.

* Also fix docker_api connection plugin.
2021-11-30 09:14:34 +01:00
Felix Fontein
b31e7d7d9c Release 2.0.1. 2021-11-13 14:13:44 +01:00
Felix Fontein
772f35c65c Prepare 2.0.1 release. 2021-11-13 13:56:14 +01:00
Felix Fontein
5183f84962 Release 2.0.0. 2021-10-21 07:31:39 +02:00
Felix Fontein
8ecebcefbb Prepare 2.0.0 release. 2021-10-20 17:59:15 +02:00
Felix Fontein
4070dab9a8
Remove deprecated features, bump version to 2.0.0 (#210)
* Remove docker_login's email option.

* container_default_behavior now has default value no_defaults.

* Disallow 'all' next to other ports. Deprecate 'all' in favor of publish_all_ports.

* Change default for network_mode.

* Add changelog fragment.

* Fix tests.

* Next expected release is 2.0.0.
2021-10-05 17:39:42 +02:00
Ajpantuso
14f15c0aec
docker_compose - Fix timeout defaulting behavior (#163)
* Initial commit

* Adding changelog fragment

* Updating changelog for breaking change
2021-10-05 08:38:24 +02:00
Felix Fontein
260c17ad91 Release 1.10.0. 2021-10-05 07:34:37 +02:00
Felix Fontein
ce25cb907a Prepare 1.10.0 release. 2021-10-05 07:33:23 +02:00
Felix Fontein
f01dacd6cf
Looks like we forgot to add the new modules to the action_group. (#209) 2021-09-18 17:07:35 +02:00
Felix Fontein
5d861004db
docker_config and docker_secret: add data_src option (#203)
* Add data_src options to docker_config and docker_secret.

* Add examples.

* Fix test.

* Another fix.
2021-09-12 09:42:03 +02:00
Felix Fontein
a56cad3a09 Release 1.9.1. 2021-08-29 13:44:07 +02:00
Felix Fontein
50b3e8a2d4 Prepare 1.9.1 release. 2021-08-27 05:44:06 +02:00
Ajpantuso
4dfc3ae5d7
docker_compose - Fix idempotency when services have no enabled profiles (#192)
* Initial Commit

* Adding integration tests

* Fixing integration and adding changelog fragment
2021-08-20 13:33:35 +02:00
Felix Fontein
36a01c164f Release 1.9.0. 2021-08-03 22:25:13 +02:00
Felix Fontein
930f9d1bcd
Improve error message on import errors. (#188) 2021-08-02 21:04:25 +02:00
Felix Fontein
46bffd2f36 Prepare 1.9.0 release. 2021-08-02 19:33:32 +02:00
Felix Fontein
6f52747693
docker_container: fix handling of command and entrypoint in a backwards-compatible way (#186)
* Fix handling of command and entrypoint in a backwards-compatible way.

* Fix copy'n'paste error.

* Fix some more.

* Improve documentation.

* Keep command and entrypoint as lists and not as strings.

* Simplify code, since we're already emitting the deprecation warning in this case during parameter processing.

* Change default only in community.docker 3.0.0.

* Update tests/integration/targets/docker_container/tasks/tests/options.yml

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

* Apply suggestion to more places.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2021-08-02 19:31:46 +02:00
Ajpantuso
03f649f43c
docker_compose - Fix startup errors for docker-compose versions <1.17.0 (#182)
* Initial Commit

* Adding changelog fragment

* Applying review suggestions
2021-07-31 11:37:02 +02:00
Felix Fontein
72fb3a5d1a
Fix check_mode for some _info modules. (#183) 2021-07-28 21:49:15 +02:00
Ajpantuso
b2430f756f
Allowing anonymous volumes via mounts option (#181)
* Initial Commit

* Adding changelog fragment
2021-07-27 17:35:40 +00:00
Felix Fontein
e2785de840
Make sure that 'container' is returned in more circumstances, and improve documentation when it is actually returned (#178)
* Make sure that 'container' is returned in more circumstances, and improve documentation when it is actually returned.

* Fix typos.
2021-07-24 21:01:14 +02:00
Ajpantuso
9b661a6ac2
docker_compose - add env_file option (#174)
* Initial commit

* Adding changelog and fixing docs

* Fixing integration tests

* Restricting minimum docker-compose versions for tests

* Applying initial review suggestions
2021-07-16 19:01:20 +02:00
Felix Fontein
61d9237eef Move changelog fragment to correct place, and add note that the change was already in 1.8.0. 2021-07-01 07:15:34 +02:00
Felix Fontein
2593c09d49 Release 1.8.0. 2021-06-28 21:03:06 +02:00
Felix Fontein
9e39014baf Prepare 1.8.0 release. 2021-06-28 21:02:40 +02:00
Ajpantuso
072d96ca62
docker_compose - Adding profiles option. (#167)
* Initial commit

* fixing tests

* Adding changelog fragment
2021-06-28 20:54:54 +02:00
Felix Fontein
badcd61a74
Replace ansible.module_utils._text by ansible.module_utils.common.text.converters. (#164) 2021-06-26 13:39:51 +02:00
Ajpantuso
825a4f74d3
docker_plugin - adding alias option and general cleanup (#161)
* Initial Commit

* Adding changelog fragment
2021-06-25 21:45:53 +02:00
Ajpantuso
49c8fd0aa5
docker_host_info - Allow filters which are passed as lists (#160)
* Initial Commit

* Adding integration tests

* Adding example in docs

* Adding changelog fragment

* Applying initial review suggestions
2021-06-22 22:27:38 +02:00
Felix Fontein
af2b3b0493
docker_compose: fix idempotency for stopped services (#159)
* Always use |= instead of = when updating changed status.

* Fix idempotence bug.

* Add changelog fragment.
2021-06-22 12:07:50 +02:00
Felix Fontein
902bcc6193
Pass Docker daemon connection params from inventory to connection plugin (#157)
* Move variable handling to doc fragment, and make them known to module_utils.

* Pass Daemon connection options to connection plugin.

* Add changelog fragment.

* Fix syntax error.

* Forgot 'options:'.
2021-06-22 06:29:56 +02:00
Felix Fontein
5fa0aa073c Release 1.7.0. 2021-06-08 14:05:55 +02:00
Felix Fontein
0d3d5fd6cb Prepare 1.7.0 release. 2021-06-07 07:02:29 +02:00
Felix Fontein
b775bac593
docker_image: allow to tag images by name, improve docs (#149)
* Add test to tag image with ID.

* Document that source=local also works with image IDs.

* Improve 'repository' documentation.

* Fix typo.

* Looks like a fix is needed to make this work.

* ...

* Avoid unnecessary re.search() calls.

* Add changelog fragment.

* Improve main description.

* Remove import.
2021-06-07 07:01:10 +02:00
Felix Fontein
edd14808ee Release 1.6.1. 2021-05-17 13:58:16 +02:00
Felix Fontein
355b29e7d3 Prepare 1.6.1. 2021-05-17 13:55:25 +02:00
Felix Fontein
c20186901b
Only emit tls_hostname deprecation warning if TLS is actually used (#143)
* Only emit tls_hostname deprecation warning if TLS is actually used.

* Linting.
2021-05-17 13:24:50 +02:00
Felix Fontein
36c1b4d818 Relesae 1.6.0. 2021-05-11 07:33:38 +02:00
Shane St Savage
a512e7fb9e
feat: allow unlimited memory_swap in docker_container (#138)
* feat: allow unlimited memory_swap in docker_container

summary: in docker_container, allow `memory_swap: values
`unlimited` and `-1` for unlimited container swap usage.

`--memory-swap=-1` is a valid docker run value allowing
unlimited swap usage. `docker_container` should allow
setting this value via `memory_swap` values `unlimited`
and `-1` as it sometimes must explicitly be set to prevent
docker from attempting to limit swap usage to double the
`--memory` value by default. In rootless docker environments,
attempting to set `memory-swap` usage limits will result in an error
if the user doesn't have the ability to do so. Allowing explicit
unlimited swap usage via docker_container will prevent these errors.

https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details

* Update tests/integration/targets/docker_container/tasks/tests/options.yml

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-10 20:24:04 +02:00
Felix Fontein
9ad7d3490a Prepare 1.6.0 release. 2021-05-10 17:57:22 +02:00
Felix Fontein
3a0d3e15fb
Configure plugin after installing it. (#135) 2021-05-07 07:14:28 +02:00
Felix Fontein
74475d1d9b
docker_swarm_service: fix crash during idempotence check if published_port is not specified (#136)
* Avoid crash during idempotence check if published_port is not specified.

* Add tests.

* Convert lambda to function.
2021-05-05 08:00:22 +02:00
Alexandr N. Zamaraev
859bc29f9e
docker_compose: fix #12 (#119)
* fix #12

* Create 12-correct_pull_wo_starting.yaml

* Update changelogs/fragments/12-correct_pull_wo_starting.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/12-correct_pull_wo_starting.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update docker_compose.py

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-04 07:53:38 +02:00
Felix Fontein
cffba7b15d
Deprecate default for tls_hostname (#134)
* Start removing default.

* Add deprecate() function to AnsibleDockerClientBase.

* Deprecate default value for tls_hostname.

* Add changelog.

* Mention deprecation in documentation.
2021-05-04 07:50:33 +02:00
daeseokyoun
3f8946a369
adds missing changelog fragment file (#126)
* adds missing changelog fragment file

changelog fragment file for #125

* Update changelogs/fragments/125-correct-error-message-for-docker-sdk-version.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-17 13:26:15 +02:00
Felix Fontein
dd03fdbc6a Release 1.5.0. 2021-04-11 16:06:02 +02:00
Felix Fontein
5d7f970bc5 Prepare 1.5.0. 2021-04-11 15:52:19 +02:00
Felix Fontein
a3b9648233
Improve exception handling. (#121) 2021-04-08 08:00:01 +02:00
Felix Fontein
e9b10ee0a4
Add use_ssh_client flag (#114)
* Add use_ssh_client option.

* Unrelated cleanup (unneeded imports).

* Add SSH connection tests.
2021-04-02 10:14:09 +02:00
Felix Fontein
92db288917 Release 1.4.0. 2021-03-14 22:56:10 +01:00
sgpinkus
149a3abbc3
Fix update_failure_action KeyError in docker_swarm_service (#100)
* Fix update_failure_action KeyError in docker_swarm_service.py

* Update plugins/modules/docker_swarm_service.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-14 22:52:27 +01:00
Felix Fontein
bfda6439ba Add 1.4.0 release summary. 2021-03-14 22:35:28 +01:00
sgpinkus
5b74313023
Make docker_swarm_service option publish.published_port optional (#101)
* Change docker_swarm_service option publish.published_port from required to optional. If not specified random high port is assigned by docker.

* Update changelogs/fragments/101-make-service-published-port-optional.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-03-13 13:37:56 +01:00
Felix Fontein
b42b76fc45
[security] docker_swarm: mark join_token as no_log (#103)
* Mark join_token as no_log.

* Apply suggestions from code review

Co-authored-by: Piotr Wojciechowski <23406016+WojciechowskiPiotr@users.noreply.github.com>

Co-authored-by: Piotr Wojciechowski <23406016+WojciechowskiPiotr@users.noreply.github.com>
2021-03-12 22:31:39 +01:00
Felix Fontein
e42aadf3e9
docker_swarm_service: flag secrets option as not secret (#102)
* Flag secrets option as not secret.

* Add changelog fragment.
2021-03-12 22:01:11 +01:00
Felix Fontein
8f4f69975b Release 1.3.0. 2021-03-08 02:38:38 +01:00
Felix Fontein
0b82f921b8 Add 1.3.0 release summary. 2021-03-08 02:18:23 +01:00
Felix Fontein
f2d16da643
docker_image: improve/fix handling of image IDs (#87)
* Improve/fix handling of image IDs in docker_image.

* Fix syntax error.

* Linting.

* Fix name collision.

* Add various tests.

* Fix tests.

* Improve image finding by ID, and fix various related bugs.

* accept_not_there -> accept_missing_image.

* Remove unnecessary dummy variable.
2021-02-28 10:40:11 +01:00
Felix Fontein
ed9bf1117f
docker_image: allow to specify pull platform (#89)
* Allow to specify pull platform.

* Add basic test and document that the value is not used for idempotency at the moment.

* Fix pulling.

* Simplify code.

* Add API version for pull_platform.

* Move pull_platform into new pull option. Use apply_defaults=True to avoid some special logic.

* Add example.

* Remove apply_defaults=True.
2021-02-24 23:45:34 +01:00
Felix Fontein
f107ab281f
Add storage_opts option. (#93) 2021-02-24 23:01:34 +01:00
Piotr Wojciechowski
3ddd75ac68
Replicas max per node (#92)
* Adding 'replicas_max_per_node' placement parameter

* Adding 'replicas_max_per_node' placement parameter

* Adding 'replicas_max_per_node' integration tests

* Adding 'replicas_max_per_node' feature

* 'replicas_max_per_node' documentation update

* 'replicas_max_per_node' unit test fix

* Documentation and changelog updates

* Update changelogs/fragments/92-replicas-max-per-node.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: WojciechowskiPiotr <devel@it-playground.pl>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-24 10:14:06 +01:00
Felix Fontein
f5d68755c4
Fix healthcheck idempotency issue with strict comparison. (#88) 2021-02-17 22:56:52 +01:00
Felix Fontein
bbf8373f6c Release 1.2.2. 2021-02-05 17:52:24 +01:00
Felix Fontein
2d48253b6d Prepare 1.2.2 release. 2021-02-05 17:51:48 +01:00
David Moreau Simard
58babf738b
docker swarm - Add no_log to the signing_ca_key argument (#80)
* docker swarm - Add no_log to the signing_ca_key argument

This will prevent accidental disclosure.

See: CVE-2021-20191

* Update changelogs/fragments/CVE-2021-20191_no_log.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-04 21:03:43 +01:00
Felix Fontein
bcd1201af6 Release 1.2.1. 2021-01-28 07:43:11 +01:00
Felix Fontein
e957b885f8 Prepare 1.2.1 bugfix release. 2021-01-28 07:41:44 +01:00
Romain Lalaut
43cbe3095b
docker.py: allow docker versions beginning with 'v' (#76)
* docker.py: allow docker versions with a leading 'v'

* Update changelogs/fragments/76-leading-v-support-in-docker-version.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-27 14:16:35 +00:00
Felix Fontein
4df5a7468a Release 1.2.0 2021-01-25 17:58:21 +01:00
Felix Fontein
fa18833c10 Add release summary. 2021-01-25 17:14:05 +01:00
Felix Fontein
8702713ac3
docker_image: do not crash in load_image for docker-py < 2.5.0. (#73)
* Avoid crash for docker-py < 2.5.0.

* Add warnings when load_image does not return a generator.

* Add test.

* Update plugins/modules/docker_image.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-25 15:17:04 +01:00
Felix Fontein
c1e6c2e699
Fix IPv6 zone handling (#66)
* Support IPv6 zones (RFC 4007).

* Add changelog fragment.

* Remove change for docker_network.

* Add IPv6 zone test.

It looks like an arbitrary zone name works. If Docker daemon ever starts
validating it (against what?) we either have to try to fix this test by
a valid value, or remove it again.
2021-01-25 15:16:35 +01:00
Felix Fontein
2ad8a0812a Fix changelog fragment. 2021-01-22 07:58:40 +01:00
Felix Fontein
6adb148675
Add default_host_ip option. (#71) 2021-01-20 23:53:23 +01:00
Felix Fontein
9fa08824e2 Release 1.1.0. 2021-01-03 13:43:34 +01:00
Felix Fontein
04f5c7e0c9 Add 1.1.0 release summary. 2021-01-03 13:43:04 +01:00
Felix Fontein
c7a3d9f057
docker_container: cgroup_parent (#59)
* Document that the Docker SDK for Python is used by the module.

* Allow to specify cgroup_parent for container.
2021-01-03 13:30:09 +01:00
Felix Fontein
e4b747d788
docker_container: return status also when 0 for non-detached containers (#58)
* Return status also when 0.

* Fix PR number.
2021-01-02 18:53:25 +01:00
Felix Fontein
5eef093e99
Check output of load_image and react upon. (#55) 2020-12-27 15:04:38 +01:00
Felix Fontein
1277942a4e
Deprecate current behavior when specifying all with other port mappings. (#60) 2020-12-26 18:20:52 +01:00
Felix Fontein
117f132213
docker_image: always push, also when tagging is not necessary (#53)
* Always push, also when tagging is not necessary.

* Add tests.

* Fix tests.
2020-12-26 18:20:28 +01:00
Felix Fontein
d40c2409d3
docker_image: allow to specify build platform (#54)
* Allow to specify build platform.

* Add basic tests.
2020-12-25 19:01:37 +01:00
Felix Fontein
7dd28ecdfe Release 1.0.1. 2020-12-11 21:27:28 +01:00
Felix Fontein
ab9fb3f604 Prepare 1.0.1 release. 2020-12-11 20:41:04 +01:00
Felix Fontein
518e99411a
Fix capabilities validation for device_requests. (#43) 2020-12-08 13:31:17 +01:00
Felix Fontein
517eba3fdd Release 1.0.0. 2020-11-17 08:05:06 +01:00
Felix Fontein
9b0a3a02eb Prepare 1.0.0 release. 2020-11-17 07:49:53 +01:00
Raghu Siddarth Udiyar
ea8c107625 Add docker build output to task result (#805)
The build output is only added during failures, but its useful to
have this available during normal task execution as well.
2020-11-15 16:57:05 +01:00
Aram Akhavan
22ba76b4e9
Add a warning when ansible_key label is not found on a secret. (#31)
* add a warning when ansible_label is not found on a secret. addresses #30

* Update changelogs/fragments/31-docker-secret.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-09 08:31:55 +01:00
Felix Fontein
1156db420d
Add collection-side support for the docker action group. (#17) 2020-11-01 17:04:48 +01:00
Felix Fontein
6b8801e15f Release 0.1.0. 2020-10-30 07:17:55 +01:00
Felix Fontein
5dba331bc7 Adjust deprecations (#1)
* First batch of c.g 2.0.0 deprecations.

* Remove use_tls and force from docker_image.

* More removals.

* Change community.general 3.0.0 deprecations to community.docker 2.0.0.

* Fix sanity.

* Fixing some bugs.

* Add PR URL to fragment.

ci_complete
ci_coverage

* Improve docs, remove superfluous code.
2020-10-30 07:05:51 +01:00
Felix Fontein
400c484a54 Remove version_added from community.general, and add changelog fragments since community.general 1.2.0. 2020-10-30 07:05:51 +01:00
Felix Fontein
81948c7470 Prepare release: improve documentation, add release summary (#3)
* Add release summary for 0.1.0.

* Update README.
2020-10-30 07:05:51 +01:00
John R Barker
42315baa74 Initial commit 2020-10-30 07:05:51 +01:00