Felix Fontein
635716c07b
docker_compose_v2: use --yes when available instead of -y ( #1060 )
...
* Use --yes if available.
* Add smoke test.
2025-03-21 22:05:10 +01:00
londondaintta
c13b891bc9
fix(docker_compose_v2): fix version check ( #1059 )
...
* fix version check
* add changelog fragment
2025-03-17 20:20:21 +01:00
Jonas Geiler
a3f9c21228
fix(docker_compose_v2): use correct flag for assume_yes ( #1054 )
...
* fix: use correct flag for `assume_yes`
The correct flag is `--y`, not `--yes`.
* refactor(docker_compose_v2): use `-y` instead of `--y` to ensure future compatibility
Maybe they'll change it back to `--yes` sometime, so I'll use the short form that most likely won't change.
* docs(docker_compose_v2): add note about `-y` flag
Co-authored-by: Felix Fontein <felix@fontein.de>
* chore: add changelog fragment
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-10 22:18:45 +01:00
Felix Fontein
cfb970bd53
docker_network: add enable_ipv4 option ( #1049 )
...
* Add enable_ipv4 option.
* Add changelog fragment.
2025-03-01 15:03:43 +01:00
londondaintta
187014101b
add --yes parameter to docker compose up ( #1045 )
...
* add yes option for compose up to assume yes and prevent hanging
* fix type
* add default
* add changelog fragment
* Apply doc suggestion
Co-authored-by: Felix Fontein <felix@fontein.de>
* set version_added to 4.5.0
* use `assume_yes` to avoid clashing with yaml `yes` keyword
* add version check
* default self.yes to False
* update description
* Fail on older version
Co-authored-by: Felix Fontein <felix@fontein.de>
* update changelog fragment
* update description
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-03-01 15:03:23 +01:00
Felix Fontein
5ce4783053
Prepare 4.4.0 release.
2025-02-13 21:10:00 +01:00
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
bcd6e57450
Vendored Docker SDK for Python code: remove unused constants ( #1037 )
...
* Remove constants that are never used.
* Adjust unit tests.
2025-02-01 23:14:19 +01:00
Felix Fontein
511cfe52ca
Improve error handling. ( #1035 )
2025-01-31 19:39:08 +01:00
Felix Fontein
8bae4e9c6d
Also mention glob patterns and redirects. ( #1032 )
2025-01-25 22:26:17 +01:00
Felix Fontein
9cc70f5202
Fix label sanitization error handling. ( #1029 )
2025-01-22 20:45:08 +00:00
Felix Fontein
29ff1241ce
Use multiple YAML documents for inventory plugin examples. ( #1023 )
2025-01-07 21:21:01 +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
c10ae4a24d
Fix doc fragments indents.
2024-12-29 15:48:30 +01:00
Florian Apolloner
6172a9291c
Determine the compose version via a CLI call and not the docker API. ( #1021 )
...
* Determine the compose version via a CLI call and not the docker API.
* Update plugins/module_utils/compose_v2.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-29 14:13:39 +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
28e87f4602
Compose v2: improve parsing of dry-run building JSON events ( #976 )
...
* Catch more warnings that shouldn't be there.
* Add explicit handling of dry-run image build JSON events.
These produce some one-off ID values that don't make any sense as ID values.
2024-10-14 20:56:49 +02:00
Felix Fontein
1485adce29
Make clear that inventory config files need to have a very speific ending. ( #974 )
2024-10-04 10:17:23 +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
c3aceebd7d
Docker* connection plugins: add working_dir and privileged options ( #943 )
...
* Add working_dir option.
* Add privileged option.
* Add basic tests.
* Also test privileged.
2024-07-25 20:35:32 +00:00
Felix Fontein
7464002bc3
Docker* connection plugins: allow to pass extra environment variables when running commands ( #940 )
...
* Allow to pass extra environment variables when running commands.
* Make compatible with older Python.
* Remove env and ini sources for extra_env.
2024-07-25 21:26:15 +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
45b2531129
docker_compose_v2* modules: use --progress json for Compose 2.29.0+ ( #931 )
...
* Use --progress json for Compose 2.29.0+.
* Add changelog fragment.
* Fix/improve handling of warnings.
* Improve parsing of warnings and some one-off messages.
* Improve warnings.
* Handle tail messages.
* Fix bug in regular event parsing.
2024-07-25 18:33:42 +02:00
Felix Fontein
ebec16d42c
Handle network_mode=default correctly for Docker 26.1.0+. ( #936 )
2024-07-25 18:30:12 +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
6fcbd34e23
Prevent infinite loop. ( #922 )
2024-07-07 23:18:58 +02:00
Felix Fontein
259f2cf8b7
Fix docker_compose_v2 example. ( #917 )
2024-07-06 21:20:13 +02:00
Felix Fontein
48c0cdf2c5
Imporve parsing of skipped messages. ( #916 )
2024-07-06 21:10:39 +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