Commit Graph

354 Commits

Author SHA1 Message Date
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 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
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
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 8bcc3519d4 Add check_files_existing option. (#839) 2024-04-21 16:01:07 +02:00
Felix Fontein 1ee9109a73 Make wrapping variables as unsafe smarter to avoid triggering an AWX bug. (#835) 2024-04-18 07:52:15 +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 bf1281ae7f Prevent RCE via inventory plugins (#815)
* Prevent RCE via inventory plugins.

* Do not make ansible_connection unsafe.

* Add test.
2024-03-14 20:08:41 +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 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 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
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 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 32cb76b164 Add scale option. (#776) 2024-01-24 07:16:33 +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 37d0a44c0b Adjust descriptions. (#766) 2024-01-20 14:13:11 +01:00
Felix Fontein ac41379119 Fix archive idempotency. (#765) 2024-01-20 14:12:55 +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 ab73061a5f Also check for compose.yaml and compose.yml, and do not require the Compose file to be an actual file. (#759) 2024-01-16 19:03:29 +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 f429017d94 Add inventory filter capability (#698)
* Add inventory filter capability.

* Use community.library_inventory_filtering_v1 collection.

* Bump dependency to 1.0.0.

* Mention the new dependency in the changelog.
2024-01-13 15:51:02 +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