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
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
c97ac2337f
Zuul third-party-check: disable ansible-doc part of galaxy-importer. ( #781 )
2024-01-27 14:49:28 +01:00
Felix Fontein
b5d085bb88
Parse build events from stderr. ( #779 )
2024-01-25 06:40:32 +01:00
Felix Fontein
b5391c7971
Add action group sanity test. ( #777 )
2024-01-24 08:25:17 +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
648e0652d5
mac_address no longer works with Docker API v1.44+. ( #764 )
2024-01-20 14:06:29 +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
1c8272f821
Change Docker Stack modules to use common CLI module framework. ( #745 )
2024-01-14 08:54:06 +01:00
Felix Fontein
f04cdb7e06
Remove sanity ignore files for Ansible 2.9 and ansible-base 2.10. ( #753 )
2024-01-13 16:05:59 +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
97a0610f25
Docker Compose v2: extend/improve event parsing tests ( #752 )
...
* Normalize ansible-docker-test-xxx in stderr logs.
* Deduplicate.
* Add new testcases including the new module.
2024-01-13 15:49:30 +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
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
5256f94342
Adjust to new shellcheck in ansible-core devel's sanity tests. ( #741 )
2024-01-04 22:27:34 +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
39717d380e
Avoid shadowing loop variables. ( #738 )
2024-01-02 14:21:19 +01:00
Felix Fontein
ce7402dc9f
Add docker_image_build module. ( #735 )
2024-01-02 09:21:45 +01:00
Felix Fontein
42453444ff
Compose digest instead of accidentally using wrong one. ( #733 )
2023-12-31 15:31:43 +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
8ee0452776
Run registry tests only when registry is present. ( #729 )
2023-12-29 11:27:49 +01: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
4929ef603a
Integration tests: split up Docker setup, move docker_compose tests into own group ( #718 )
...
* Rename setup role.
* Create new CI group 6, and move docker_compose v1 tests into there.
* Split up Docker setup in integration tests.
* Change setup_docker_compose_v1 to install its own Docker SDK for Python.
* Docker SDK for Python not needed to set up registry or query host info.
2023-12-09 17:35:54 +01:00
Felix Fontein
b8afdc52b1
Fix bad expressions in tests. ( #711 )
...
ci_complete
2023-11-28 22:52:43 +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
4d9b85c975
Update vendored Docker SDK for Python code ( #694 )
...
* vendored Docker SDK for Python code: volume: added support for bind propagation
https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation
Cherry-picked from https://github.com/docker/docker-py/commit/bea63224e028226085c85caecace6480fe0aa6b0
Co-authored-by: Janne Jakob Fleischer <janne.fleischer@ils-forschung.de >
Co-authored-by: Milas Bowman <milas.bowman@docker.com >
* vendored Docker SDK for Python code: fix: eventlet compatibility
Check if poll attribute exists on select module instead of win32 platform check
The implementation done in #2865 is breaking usage of docker-py library within eventlet.
As per the Python `select.poll` documentation (https://docs.python.org/3/library/select.html#select.poll ) and eventlet select removal advice (eventlet/eventlet#608 (comment)), it is preferable to use an implementation based on the availability of the `poll()` method that trying to check if the platform is `win32`.
Fixes https://github.com/docker/docker-py/issues/3131
Cherry-picked from https://github.com/docker/docker-py/commit/78439ebbe1aae77ff0fd9b666894d80807182e28
Co-authored-by: Mathieu Virbel <mat@meltingrocks.com >
* vendored Docker SDK for Python code: fix: use response.text to get string rather than bytes
Adjusted from https://github.com/docker/docker-py/commit/0618951093bf3116af482c6dfb983219c5684343
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com >
Co-authored-by: Milas Bowman <milas.bowman@docker.com >
* vendored Docker SDK for Python code: Fix missing asserts or assignments
Cherry-picked from https://github.com/docker/docker-py/commit/0566f1260cd6f89588df2128ec4e86e8266e5d74
Co-authored-by: Aarni Koskela <akx@iki.fi >
---------
Co-authored-by: Janne Jakob Fleischer <janne.fleischer@ils-forschung.de >
Co-authored-by: Milas Bowman <milas.bowman@docker.com >
Co-authored-by: Mathieu Virbel <mat@meltingrocks.com >
Co-authored-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com >
Co-authored-by: Aarni Koskela <akx@iki.fi >
2023-10-08 18:16:27 +02:00
Felix Fontein
2c633dadeb
CI: ansible-core devel drops support for Python 2.7 and 3.6 ( #691 )
...
* ansible-core devel drops support for Python 2.7 and 3.6.
* Force PyYAML 5.3.1 on Alpine.
2023-10-04 23:22:08 +02:00
Felix Fontein
d9f49fc073
Add ansible-core 2.16 to the matrix. ( #686 )
2023-09-19 17:51:26 +02:00
Felix Fontein
92fc542c00
Make unit tests work with Python 3.12. ( #673 )
2023-07-23 22:33:07 +02:00
Felix Fontein
017536953a
Force PyYAML to 5.3.1. ( #669 )
2023-07-19 15:57:00 +02:00
Felix Fontein
0a8f3fa7d6
Remove no longer needed ignore. ( #668 )
2023-07-15 12:40:52 +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
Felix Fontein
3f9f41e5a9
SuSE: install docker-compose v1 from pip instead of system packages. ( #650 )
...
The system package switched to docker-compose v2.
2023-06-20 07:58:54 +02:00
Felix Fontein
74b70f81c8
Switch to Ansible Galaxy compatible requirements files for tests. ( #633 )
2023-05-21 13:54:35 +02:00
Felix Fontein
39f2e9b9c4
Make compatible with requests 2.29.0 and urllib3 2.0 ( #613 )
...
* Make compatible with requests 2.29.0.
* This fix should also work with urllib3 2.0 according to urllib3 maintainer.
* Add changelog fragment.
* We still need the constraint for CI until Docker SDK for Python has a new release with a fix.
* Make modifications to response_class as small as possible.
* Revert "We still need the constraint for CI until Docker SDK for Python has a new release with a fix."
This reverts commit 698d544a1e08308e8bf8b4e56ab78c5079f9a17b.
* The pip coming with the ansible-core 2.11 alpine3 image seems to be too old.
2023-05-05 22:09:02 +02:00
Felix Fontein
054353bb14
Simplify test setup. ( #615 )
2023-05-03 19:39:04 +02:00
Felix Fontein
088cbaed4e
Restrict requests to < 2.29.0 ( #612 )
...
* Restrict requests to < 2.29.0.
* Also avoid urllib3, which gets installed in some cases even though it shouldn't.
2023-04-29 16:25:07 +02:00
Felix Fontein
9e1a0a6fb8
Do extra docs validation; explicitly disallow semantic markup in docs ( #607 )
...
* Do extra docs validation. Explicitly disallow semantic markup in docs.
* Forgot to add new requirement.
* Improve test.
* TEMP - make CI fail.
* Revert "TEMP - make CI fail."
This reverts commit d381f1a431 .
* Remove unnecessary import.
* Make sure ANSIBLE_COLLECTIONS_PATH is set.
* Make sure sanity tests from older Ansible versions don't complain.
2023-04-16 18:18:12 +02:00
Felix Fontein
5d61cb2b8d
Update CI matrix: add stable-2.15 ( #600 )
...
* Add ignore files for bumped devel version.
* Update CI matrix.
2023-04-04 06:12:39 +00: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
Felix Fontein
dd19db8c8f
Normalize bools in tests. ( #589 )
2023-02-15 22:29:41 +01:00
Felix Fontein
449b91d489
Remove unnecessary test imports. ( #583 )
2023-02-12 20:59:51 +01:00