Felix Fontein
e9f4553b01
docker_container idempotency: work around Docker not returning true configured command when command is [] ( #1085 )
...
* Work around Docker not returning true configured command when command is [].
* Lint.
* Add test.
* Add changelog fragment.
2025-06-08 19:05:09 +02:00
Felix Fontein
8ecbd9a5cc
docker_compose_v2: work around bug in docker compose images --format json ( #1083 )
...
* Work around ubg in docker compose images --format json.
* ContainerName is no longer in image record.
2025-06-07 23:28:51 +02: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
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
9cc70f5202
Fix label sanitization error handling. ( #1029 )
2025-01-22 20:45:08 +00: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
f69536ef3b
Improve language.
2024-12-28 14:30:49 +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
1e10834905
Sanitize labels. ( #985 )
2024-11-09 23:53:22 +01: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
423a9bbf61
Add Docker Compose v2 exec and run modules. ( #969 )
2024-09-27 13:00:48 +03:00
Felix Fontein
3cc27ecd65
Handle yet another random unstructured error output. ( #949 )
2024-08-07 15:58:23 +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
48c0cdf2c5
Imporve parsing of skipped messages. ( #916 )
2024-07-06 21:10:39 +02:00
Fran Jurinec
9b5dbd4543
Add support from device_cgroup_rules parameter ( #910 )
2024-07-04 09:51:32 +02:00
Felix Fontein
81cabbf697
CI: Run some tests with the latest development versions of Docker SDK for Python, requests, and urllib3 ( #902 )
...
* Run some tests with the latest development versions of Docker SDK for Python, requests, and urllib3.
* Use LooseVersion instead of StrictVersion to parse urllib3 versions.
2024-06-29 18:57:08 +02:00
Felix Fontein
ad9d362336
Make docker_host and cli_context mutually exclusive. ( #895 )
2024-06-28 22:26:34 +02:00
Felix Fontein
4cac2ac021
Make sure that one of project_src and definition is provided. ( #886 )
2024-06-16 21:49:20 +02:00
Felix Fontein
205867e392
Avoid using the deprecated selectors compat module utils. ( #871 )
2024-05-25 09:00:18 +02:00
Felix Fontein
1b50cee901
Add fix for requests 2.32.2+. ( #864 )
2024-05-21 19:22:39 +02:00
Felix Fontein
ab8b6662c2
Add hotfix for requests 2.32.0. ( #861 )
2024-05-20 21:08:25 +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
36c118d154
Deprecate ssl_version. ( #853 )
2024-05-11 15:53:19 +02:00
x4rd0o1Vtx
a4a05e7fa5
Add healthcheck start-interval option ( #848 )
2024-05-09 21:22:06 +02:00
Felix Fontein
8bcc3519d4
Add check_files_existing option. ( #839 )
2024-04-21 16:01:07 +02:00
Felix Fontein
8ad45286a3
Remove unused code that relies on functionality deprecated in Python 3.12. ( #834 )
2024-04-15 11:21:46 +00: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
2925334a1a
Make sure project_src is an absolute path. ( #828 )
2024-04-04 21:39:38 +02:00
Felix Fontein
7102d38923
Better error message if Compose version is 'dev'. ( #826 )
2024-03-29 19:29:14 +01:00
Felix Fontein
4bab9a6b0e
Fix idempotency of docker_compose_v2_pull. ( #814 )
2024-03-13 13:20:11 +01:00
Felix Fontein
6aea7efed9
Improve parsing of warnings and errors ( #811 )
...
* Add logfmt message parser.
* Parse logfmt formatted warnings.
* Follow-up for #810 .
* Fix handling of warning and error messages.
* Make Python 2 compatible.
* Linting. Improving tests.
2024-03-03 13:38:55 +00:00
Felix Fontein
37e28b62d3
Do not fail on non-fatal errors. ( #810 )
2024-02-28 21:43:30 +01:00
Felix Fontein
45d32d53c9
Do not consider 'Waiting' events as changes/actions. ( #804 )
2024-02-23 19:58:40 +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
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
7b554082ea
Improve parsing. ( #786 )
2024-02-01 17:52:31 +00:00
Felix Fontein
b5d085bb88
Parse build events from stderr. ( #779 )
2024-01-25 06:40:32 +01:00
Felix Fontein
eebb73a503
docker_compose_v2: add files option ( #775 )
...
* Add files option.
* Shorten lines.
2024-01-24 07:15:00 +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
ac41379119
Fix archive idempotency. ( #765 )
2024-01-20 14:12:55 +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