Felix Fontein
22ab85fe2b
docker_context_info: fix some aspects ( #1043 )
...
* Extend docker_context_info tests.
* Fix a bug in the context code.
* Fix TLS handling for contexts.
* Adjust code to fix tests.
2025-02-10 23:54:36 +01:00
Felix Fontein
3b6068e44b
Add docker_context_info module ( #1039 )
...
* Vendor parts of the Docker SDK for Python
This is a combination of the latest git version
(db7f8b8bb6 )
with some fixes to make it compatible with Python 2.7
and adjusting some imports.
* Polishing.
* Fix bug that prevents contexts to be found when no Docker config file is present.
Ref: https://github.com/docker/docker-py/issues/3190
* Linting.
* Fix typos.
* Adjust more to behavior of Docker CLI.
* Add first iteration of docker_context_info module.
* Improvements.
* Add basic CI.
* Add caveat on contexts[].config result.
2025-02-10 21:59:05 +01:00
Alexandre Díaz
ea3ac5f195
fix: docker_compose_v2_run: don't need sanitize labels ( #1034 )
2025-02-02 17:27:28 +01:00
Felix Fontein
8bae4e9c6d
Also mention glob patterns and redirects. ( #1032 )
2025-01-25 22:26:17 +01:00
Felix Fontein
5bfec5d4d2
Add 'idempotent' attribute ( #1022 )
...
* Add 'idempotent' attribute.
* Mention check mode in attribute description.
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-30 21:11:14 +01:00
Felix Fontein
bd992583c2
Improve formulations.
2024-12-28 17:09:33 +01:00
Felix Fontein
769d15de63
Reformat documentation with 'andebox yaml-doc' ( #1020 )
...
* Reformat documentation with 'andebox yaml-doc'.
* Revert unwanted changes.
* Fix too long lines.
* Fix broken quotes.
* Forgot two line breaks.
2024-12-28 16:40:50 +01:00
Felix Fontein
f69536ef3b
Improve language.
2024-12-28 14:30:49 +01:00
Felix Fontein
d17ee667ce
docker_network: adjust documentation to reality for state=absent + force=true. ( #1016 )
2024-12-20 22:51:04 +01:00
Felix Fontein
8616e7f6f2
docker_image_build: work around strange behavior of docker buildx build when --output is provided ( #1006 )
...
* Work around strange behavior of docker buildx build when --output is provided.
* Adjust tests.
* Allow to pass multiple image names; correctly quote --output values.
* Return executed command.
* Adjust tests.
2024-12-14 21:32:33 +01:00
Felix Fontein
2e7b4e4605
docker_compose_v2: add ignore_build_events option; ignore build events by default ( #1011 )
...
* Add ignore_build_events option.
* Adjust docs and tests.
* Switch default to true.
* Remove unnecessary parts from tests.
2024-12-14 19:54:40 +01:00
Felix Fontein
7583ea82ac
Prevent crash if Mode isn't present, which happens for Swarm jobs. ( #1003 )
2024-12-04 21:39:50 +01:00
Maksim Vorobyev
e19812917d
Add 'ingress' option to docker_network module ( #999 )
...
* Add 'ingress' option to docker_network module
* sanity fixes
* add changelog fragment
* Update plugins/modules/docker_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/999-add-ingress-option-to-docker_network-module.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* move 'ingress' tests to overlay.yml
* move Sworm init and Swarm cleanup to block
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-04 21:39:09 +01:00
Michael
6595d299e2
Doc fix for docker_container image_name_mismatch ( #991 )
...
* doc-fix-image-name-mismatch
* Update description.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-23 14:12:27 +01:00
Felix Fontein
78bdccd453
Correctly set can_talk_is_docker. ( #995 )
2024-11-23 13:19:32 +01:00
Sánta Balázs Levente
e3b36e5f0a
module docker_compose_v2_run: fix env argument ( #992 )
...
* module docker_compose_v2_run: fix env argument
* fix missing "--env" in docker_compose_v2_exec, and added changelog fragment
* Update changelogs/fragments/992-module-docker_compose_v2_run-fix-env-argument.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-11-23 00:06:08 +01:00
aliou-sidibe
fb9784e4c7
Add 'detach' option to docker_stack module to control immediate exit behavior on stack deployment/remove ( #987 )
2024-11-17 15:30:32 +01:00
Felix Fontein
1e10834905
Sanitize labels. ( #985 )
2024-11-09 23:53:22 +01:00
Christoph
be5564d4de
add renew_anon_volumes parameter to docker compose up ( #977 )
...
* add `renew_anon_volumes` parameter to `docker compose up`
* Apply suggestions from code review
Apply suggested changes to Documentation
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix sanity check error
apply suggestion from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* add changelog fragment for PR #977
* apply suggested changes to changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Christoph Sieber <Christoph.Sieber@telekom.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-10-19 14:21:13 +02:00
Felix Fontein
f7823ea626
Prepare 4.0.0 release. ( #971 )
2024-10-18 21:01:49 +02:00
Felix Fontein
423a9bbf61
Add Docker Compose v2 exec and run modules. ( #969 )
2024-09-27 13:00:48 +03:00
Felix Fontein
3802e424d9
docker_prune: improve docs, fix handling of lists for filters ( #966 )
...
* Improve docs.
* Fix handling of lists for filters.
2024-09-17 20:50:48 +02:00
Felix Fontein
3cc27ecd65
Handle yet another random unstructured error output. ( #949 )
2024-08-07 15:58:23 +02:00
Felix Fontein
d91f854d45
Fix composition of --output parameters. ( #947 )
2024-08-01 17:22:10 +02:00
Felix Fontein
0fe84b510b
docker_compose_v2_pull: add new options ignore_buildable, include_deps, and services; fix service CLI for docker_compose_v2 module ( #942 )
...
* Add new options for --ignore-buildable, --include-deps, and for providing services.
* Add services after -- and not before.
2024-07-25 20:47:32 +02:00
Felix Fontein
2ddadf1e2b
docker_container: pass networks to Daemon on container creation ( #933 )
...
* Pass networks to Daemon on container creation.
* Restore old behavior, and only provide all networks on creation for API 1.44+.
2024-07-23 17:34:26 +02:00
Felix Fontein
22bbfbaf8b
CLI modules: improve docker version/info output processing, avoid querying for API version if it's not needed ( #935 )
...
* Don't assume that docker version/info JSON output contains the expected fields.
* Allow CLI modules to not require the API version.
* Add changelog fragment.
2024-07-20 15:51:02 +02:00
Felix Fontein
4b7e74b75e
docker_container: allow to wait for a container to become healthy ( #921 )
...
* Allow to wait for a container to become healthy.
* Improve wording.
Co-authored-by: Don Naro <dnaro@redhat.com>
* Improve explanation.
---------
Co-authored-by: Don Naro <dnaro@redhat.com>
2024-07-09 20:07:00 +02:00
Felix Fontein
259f2cf8b7
Fix docker_compose_v2 example. ( #917 )
2024-07-06 21:20:13 +02:00
Ethan Williams
e2f93a0c66
fix mis-named keys and invalid values in copy into example ( #915 )
2024-07-06 20:55:12 +02:00
Fran Jurinec
9b5dbd4543
Add support from device_cgroup_rules parameter ( #910 )
2024-07-04 09:51:32 +02:00
Felix Fontein
36dcb94b39
Document host-gateway. ( #897 )
2024-06-28 17:03:32 +02:00
Felix Fontein
691bc6de72
Docker Compose v1 tests: restrict API version to 1.44 if default API version is 1.45+ ( #881 )
...
* Restrict API version to 1.44 if default API version is 1.45+.
* Set COMPOSE_API_VERSION if api_version is provided.
* Add changelog.
2024-06-14 08:02:12 +02:00
Sih Sîng-hông薛丞宏
a22e92cdc0
Update the example of docker_compose_v2.py ( #874 )
...
`docker-compse` => `docker compose`.
2024-06-04 13:01:23 +02:00
Felix Fontein
205867e392
Avoid using the deprecated selectors compat module utils. ( #871 )
2024-05-25 09:00:18 +02:00
x4rd0o1Vtx
5016a96eba
Allow healthcheck override without test option ( #847 )
...
* Add healthcheck test_cli_compatible option
* Update plugins/module_utils/util.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_container.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-15 18:45:01 +02:00
Felix Fontein
f2a5d6f872
docker_image_build: allow to specify multiple platforms, allow to specify secrets and outputs ( #852 )
...
* Add note on idempotency.
* Make platform a list of strings.
* Support specifying secrets.
* Add test for secrets.
* Support specifying outputs.
* Ignore invalid choices syntax for ansible-core <= 2.16.
It actually works with ansible-core 2.14+ (though not with <= 2.13),
but the sanity tests only accept it from 2.17 on.
* Only use --secret with type=env for buildx 0.6.0+, and multiple --output for buildx 0.13.0+.
2024-05-11 15:52:47 +02:00
x4rd0o1Vtx
a4a05e7fa5
Add healthcheck start-interval option ( #848 )
2024-05-09 21:22:06 +02:00
Felix Fontein
f51ca84197
docker_prune: add new options for cleaning build caches ( #845 )
...
* Add new options for cleaning build caches to docker_prune.
* Add tests.
2024-05-09 17:12:36 +02:00
Kenny Millington
9beac01ce1
docker_network: Add support for --config-from and --config-only ( #843 )
...
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-05-04 15:16:34 +02:00
Felix Fontein
30faf0b8e6
Deprecate Docker Compose v1. ( #833 )
2024-05-04 13:15:53 +00:00
Florian
368d616229
Add sysctls option to docker_swarm_service ( #836 )
...
* add sysctls option to docker_swarm_service
* Add added version number
Co-authored-by: Felix Fontein <felix@fontein.de>
* version added -> 3.10.0
Co-authored-by: Felix Fontein <felix@fontein.de>
* changelog fragment for docker_swarm_service sysctls
* add minimal docker_py / docker_api versions to use for sysctls
* set expected sysctls to null on integration test
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-04-30 22:44:25 +02:00
Felix Fontein
9e8c367c47
docker_compose_v2: allow to specify inline compose definitions ( #832 )
...
* Allow to specify inline compose definitions.
* Remove comma that trips Python 2.7.
* Add tests.
* Add PyYAML as EE dependency.
* Be more explicit on PyYAML.
2024-04-09 17:41:12 +02:00
Felix Fontein
4bab9a6b0e
Fix idempotency of docker_compose_v2_pull. ( #814 )
2024-03-13 13:20:11 +01:00
Felix Fontein
a7c7adce2f
Add docker_container_exec note on env variables; remove superfluous notes ( #806 )
...
* Remove unnecessary notes.
* Add note for evaluating environment variables.
2024-02-24 20:45:13 +01:00
Felix Fontein
6f5d67860c
docker_compose_v2: ignore some pull events ( #803 )
...
* Ignore some pull events.
* Adjust tests.
2024-02-23 18:24:16 +01:00
tigattack
f0c91ef5f9
docs(docker_plugin): note that --grant-all-permissions is true by default ( #800 )
...
* docs(docker_plugin): note that `--grant-all-permissions` is true by default
Fixes #145
* Update plugins/modules/docker_plugin.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-02-16 13:48:53 +01:00
Felix Fontein
6366464812
docker_container: allow pull=never, and make check mode behavior configurable ( #797 )
...
* Allow to configure behavior of pull=true in check mode.
* Change pull to option that accepts some strings as well, such as pull=never.
* Adjust values.
2024-02-14 22:49:22 +01:00
Felix Fontein
e494464e56
Add wait and wait_timeout options. ( #796 )
2024-02-14 22:48:36 +01:00
tigattack
4c2e7ebfbc
Fix typo in docker_image_build docs ( #793 )
2024-02-06 23:34:39 +01:00
Felix Fontein
b5d085bb88
Parse build events from stderr. ( #779 )
2024-01-25 06:40:32 +01:00
Felix Fontein
32cb76b164
Add scale option. ( #776 )
2024-01-24 07:16:33 +01:00
Felix Fontein
b2a79d9eb7
Add docker_image_export module ( #774 )
...
* Add docker_image_export module.
* Add basic tests.
* Add more seealsos.
2024-01-22 22:03:38 +01:00
Felix Fontein
fcf608b334
Add networks[].mac_address option. ( #763 )
2024-01-20 14:23:12 +01:00
Felix Fontein
37d0a44c0b
Adjust descriptions. ( #766 )
2024-01-20 14:13:11 +01:00
Felix Fontein
648e0652d5
mac_address no longer works with Docker API v1.44+. ( #764 )
2024-01-20 14:06:29 +01:00
Felix Fontein
c3322fd55b
Fix typo.
2024-01-17 12:58:20 +01:00
Felix Fontein
6082efc855
Improve docs sharing for docker_compose_v2* modules; fix examples and return docs for docker_compose_v2_pull ( #761 )
...
* Move more common documentation to docs fragment.
* Fix examples and return values for docker_compose_v2_pull.
* Remove ignore.
2024-01-17 07:53:44 +01:00
Felix Fontein
22d956efa8
Allow to pass --build or --no-build to 'docker compose up'. ( #760 )
2024-01-17 06:57:35 +01:00
Simon Baerlocher
98a74b1f9c
feat: add docker-compose services support. ( #758 )
...
* feat: add docker-compose services support.
fix: typo
* fix: error
* fix: ci Job
* feat: add argument_spec
* fix: whitespace
* feat: refactored docker_compose_v2 in response to feedback
2024-01-16 19:07:12 +01:00
Felix Fontein
1c8272f821
Change Docker Stack modules to use common CLI module framework. ( #745 )
2024-01-14 08:54:06 +01:00
Felix Fontein
307dc4045a
Add docker_compose_v2_pull module ( #751 )
...
* Add docker_compose_v2_pull module.
* Improve and extend parsing of events.
* Add ignores.
* --policy is only available since Compose 2.22.0.
2024-01-13 14:36:26 +01:00
Felix Fontein
8ca5e2f810
Extract more common code and docs fragment for Docker Compose. ( #748 )
2024-01-07 18:17:10 +01:00
Felix Fontein
cb4dd2fed1
docker_compose_v2: move some code to module_utils ( #747 )
...
* Move some code to module_utils.
* Add unit tests.
Test cases are auto-generated from integration test logs.
* Rename ResourceEvent → Event.
2024-01-07 16:17:31 +01:00
Felix Fontein
eed89f32eb
docker_compose_v2: allow to specify pull policy; parse pull events; improve error handling; always return stderr ( #746 )
...
* Add pull option for 'docker compose up'.
* Improve dry-mode event parsing, and also parse pull-related events.
* Improve error handling, and add first tests.
* Fix action status documentation.
* Add more tests.
* Always return stderr.
This makes debugging misbehavior a lot easier since you can see
what 'docker compose' actually returned.
* Reformat existing tests.
2024-01-07 08:45:20 +01:00
Felix Fontein
b774837183
Add docker_compose_v2 module ( #739 )
...
* Add docker_compose_v2 module.
* Add note on compatibility.
* Parse more events.
Emit warnings (or things we assume are warnings), and report unparsable
messages to the user so they can report them to us.
2024-01-03 07:05:08 +00:00
Felix Fontein
ce7402dc9f
Add docker_image_build module. ( #735 )
2024-01-02 09:21:45 +01:00
Felix Fontein
56bbef2b44
Fix example.
2024-01-01 18:09:08 +01:00
Felix Fontein
02bb4ceaf7
Update docs.
2023-12-31 15:14:01 +01:00
Felix Fontein
c3f8f80a75
Add docker_image_remove module. ( #732 )
2023-12-31 15:13:04 +01:00
Felix Fontein
66b341aa9e
Add docker_image_tag module ( #730 )
...
* Add docker_image_tag module.
* Add check mode tests.
* Improve and test image ID/digest handling.
* Adjust more tests.
2023-12-31 10:41:18 +01:00
Felix Fontein
20e78a92e0
Add docker_image_pull module ( #728 )
...
* Add docker_image_pull module.
* Support platform during idempotency check.
* Add diff mode, extend tests.
* Add image ID tests.
2023-12-31 09:51:42 +01:00
Felix Fontein
e22cee2c41
Add docker_image_push module. ( #731 )
2023-12-31 08:33:32 +00:00
Felix Fontein
0812d0b495
Support labels and shm_size for image build. Allow to specify (swap) memory limits in other units than bytes. ( #727 )
2023-12-28 21:42:55 +01:00
Felix Fontein
c4c347c626
Add proper platform handling. ( #705 )
2023-12-10 09:03:32 +01:00
Felix Fontein
80e39f84d8
Update docker_compose docs to indicate that it is incompatible with Docker SDK for Python 7+. ( #717 )
2023-12-09 14:40:15 +01:00
Felix Fontein
907dc28f73
Deprecate default 'ignore' of 'image_name_mismatch'. ( #703 )
2023-12-07 12:32:50 +01:00
Alexander Jähnel
4c220c4d74
fix(community.docker.docker_volume): labels can be none ( #702 )
...
* fix(community.docker.docker_volume): labels can be none
catch case where volume labels can are done (default) eg:
$ docker volume inspect foo
[
{
"CreatedAt": "2023-11-11T12:55:23+01:00",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/foo/_data",
"Name": "foo",
"Options": {},
"Scope": "local"
}
]
* Update plugins/modules/docker_volume.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* add(community.docker.docker_volume): changelog fragment
* Update changelogs/fragments/702-docker-volume-label-none.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-11-12 11:19:56 +01:00
Felix Fontein
14683421b5
Fix failing sanity test. ( #700 )
2023-11-08 13:23:39 +01:00
Felix Fontein
1c66f880ee
Fix typos, improve markup, improve scenario guide ( #699 )
...
* Fix typos.
* Improve markup.
* Mention missing 'new' modules in scenario guide.
2023-10-29 08:30:24 +01:00
Felix Fontein
fbc2750b6a
Do not pass data_path_addr for older Docker SDK for Python versions. ( #696 )
2023-10-14 23:48:46 +02:00
Ethan Paul
78801088ae
Update docker_stack_info module documentation to clarify functionality ( #693 )
...
* Update documentation to reflect module functionality
Clarify that this module is used for accessing information on all stacks
Add link to docker_stack_task_info module for users looking for detailed info on a single stack
Fixes #690
* Remove trailing whitespace, add trailing period.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-07 14:04:59 +02:00
Felix Fontein
d266c69ddc
Fix documentation ( #684 )
...
* Fix documentation.
* Fix line length.
2023-09-10 21:27:26 +02:00
Felix Fontein
6f6dd14492
Ignore sanity check. ( #679 )
2023-08-11 09:01:39 +02:00
bastantoine
e21d6d380c
Fix example of docker-compose module ( #674 )
2023-07-25 10:09:47 +02:00
Felix Fontein
024bdec919
Use semantic markup ( #645 )
...
* Use semantic markup.
* Linting.
* Define docsite targets.
* Forgot one env var.
* Add array stubs.
2023-06-22 07:01:31 +02:00
Kendi
861988fd36
Update docker_container_exec.py documentation ( #642 )
...
Should be or not and
2023-06-01 12:59:49 +02:00
Felix Fontein
748d619fb2
Fix EndpointSpec KeyError. ( #637 )
2023-05-26 17:58:09 +02:00
Felix Fontein
7bdb2127e0
Improve examples: use FQCNs and always add name: to tasks ( #624 )
...
* Improve examples: use FQCNs and always add name: to tasks.
* Improvements.
Co-authored-by: Don Naro <dnaro@redhat.com>
---------
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-15 21:41:58 +02:00
Felix Fontein
245ab76b09
Warn that SSLSocket cannot send close_notify TLS alerts ( #621 )
...
* Warn that SSLSocket cannot send close_notify TLS alerts.
* Improve formulation.
Co-authored-by: Don Naro <dnaro@redhat.com>
---------
Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-15 21:41:23 +02:00
Felix Fontein
6187068ee5
Improve time units of docker_swarm documentation. ( #623 )
2023-05-13 15:25:42 +00:00
Ville Ojamo
634da44f67
docker_swarm: document docker_node module for manager removal ( #602 )
...
* docker_swarm: document manager removal
Add note that community.docker.swarm_node needs to
be used to demote a manager before it can be removed.
Fixes #601 .
* docker_swarm: improve wording
* docker_swarm: fix formatting
2023-04-08 18:09:57 +02:00
Felix Fontein
d0a3e587a5
More true/false normalization. ( #597 )
2023-03-06 22:17:13 +01:00
Felix Fontein
08bfcf7e5f
docker_prune: correctly return 'changed' result ( #593 )
...
* Correctly return 'changed' status.
* Extend tests.
* Fix typo.
2023-02-24 17:24:16 +01:00
Kristof Mattei
d2f551fc5d
fix: fix tmpfs_size and tmpfs_mode not being set ( #580 )
...
* fix: fix tmpfs_size and tmpfs_mode not being set
* fix: wrong file
* fix: add changelog fragment
* fix: update changelog fragment to match formatting
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-02-10 14:05:09 +01:00
Felix Fontein
54a3dc151d
Remove unneccessary imports ( #575 )
...
* Remove unneccessary imports.
* Add noqas.
2023-02-09 15:25:45 +01:00
Felix Fontein
421bae419d
Improve current_container_facts docs ( #574 )
...
* Improve current_container_facts docs.
* [TEMP] Run current_container_facts module in CI outside of ansible-test.
* Revert "[TEMP] Run current_container_facts module in CI outside of ansible-test."
This reverts commit 1cdd3e3550 .
* Describe current state of return values.
2023-02-03 17:13:31 +01:00
David Jack Wange Olrik
c24ea78f6e
docs: Fix json path in asserts ( #560 )
...
##### SUMMARY
The current path to the running state does not include `output.services.` which it should.
##### ISSUE TYPE
- Docs Pull Request
+label: docsite_pr
2023-01-20 13:19:33 +01:00
Felix Fontein
b114d451fd
Forgot to add version_added.
2023-01-14 11:19:42 +01:00
Felix Fontein
c7cbec0163
docker_plugin: do not crash when plugin doesn't exist ( #553 )
...
* Do not crash when plugin doesn't exist.
* Improve style.
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2023-01-13 20:49:06 +01:00