Commit Graph

23 Commits

Author SHA1 Message Date
Felix Fontein
423a9bbf61
Add Docker Compose v2 exec and run modules. (#969) 2024-09-27 13:00:48 +03:00
Felix Fontein
30faf0b8e6
Deprecate Docker Compose v1. (#833) 2024-05-04 13:15:53 +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
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
a53ecb6e66
Forgot to add docker_compose_v2_pull to action group. (#773) 2024-01-21 22:04:27 +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
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
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
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
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
e198e4ab43
Add docker_container_copy_into module (#545)
* Move copying functionality to module_utils.

* Add docker_container_copy_into module.

* Use new module in other tests.

* Fix copyright and attributes.

* Improve idempotency, improve stat code.

* Document and test when a stopped container works.

* Improve owner/group detection error handling when container is stopped.

* Fix formulation.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

* Improve file comparison.

* Avoid reading whole file at once.

* Stream when fetching files from daemon.

* Fix comment.

* Use read() instead of read1().

* Stream files when copying into container.

* Linting.

* Add force parameter.

* Simplify library code.

* Linting.

* Add content and content_is_b64 options.

* Make force=false work as for copy module: only copy if the destination does not exist.

* Improve docs.

* content should be no_log.

* Implement diff mode.

* Improve error handling.

* Lint and improve.

* Set owner/group ID to avoid ID lookup (which fails in paused containers).

* Apply suggestions from code review

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2023-01-09 11:52:29 +01:00
Felix Fontein
2261dff49f
Document attributes (#497)
* Add 'docker' action group attribute.

* Compatibility with older ansible-core releases.

* Fix typo.

* Docment standard attributes.

* Improve docs.

* Add shortcuts for common combinations.
2022-11-06 21:15:09 +01:00
Felix Fontein
a4539a309e
Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml (#430)
* Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml.

* ignore.txt lines cannot be empty or contain only a comment.

* Cleanup.

* This particular __init__.py seems to be crucial.

* Try extra newline.

* Markdown comments are a real mess. I hope this won't break Galaxy...

* More licenses.

* Add sanity test.

* Skip some files, lint.

* Make sure there is a copyright line everywhere.

* Also check for copyright line in sanity tests.

* Remove colon after 'Copyright'.

* Normalize lint script.

* Avoid colon after 'Copyright' in lint script.

* Improve license checker.

* Update README.md

Co-authored-by: Maxwell G <9920591+gotmax23@users.noreply.github.com>

* Remove superfluous space.

* Referencing target instead of symlink

Co-authored-by: Maxwell G <9920591+gotmax23@users.noreply.github.com>
2022-07-20 07:45:33 +02:00
Felix Fontein
623786c659
Implement all remaining deprecations for 3.0.0 (#400)
* Remove support for Ansible 2.9 and ansible-base 2.10.

* Remove Ansible 2.9 compatiblity code.

* Remove docker-compose from EE.

* Drop support for Python 2.6. Stop advertising docker-py for Python 2.6.

* Drop support for API versions 1.20 to 1.24.

* Fix condition.
2022-07-02 17:13:53 +02:00
Felix Fontein
4d508b4c37
Vendor API connection code from Docker SDK for Python (#398)
* Vendor parts of the Docker SDK for Python

This is a combination of the latest git version
(a48a5a9647)
and the version before Python 2.7 support was removed
(650aad3a5f),
including some modifications to work with Ansible module_utils's
system (i.e. third-party imports are guarded, and errors are
reported during runtime through a new exception
MissingRequirementException).

* Create module_utils and plugin_utils for working with the vendored code.

The delete call cannot be called delete() since that method already exists from requests.

* Vendor more code from Docker SDK for Python.

* Adjust code from common module_utils.

* Add unit tests from Docker SDK for Python.

* Make test compile with Python 2.6, but skip them on Python 2.6.

* Skip test that requires a network server.

* Add changelog.

* Update changelogs/fragments/398-docker-api.yml

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

* Minimum API version is 1.25.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2022-07-02 16:40:44 +02:00
Felix Fontein
e12a487e6a
Add EE support, support GHA in current_container_facts (#336)
* Try adding EE support.

* Use GHA instead of AZP for EE tests.

* Update changelog fragment, extend tests.

* Disable current_container_facts test.

* Increase verbosity.

* 2.9 compatibility.

* Use docker instead of podman for building EE and running tests in it.

* Output some more information (helpful for debugging).

* Fix GHA handling for current_container_facts.

* Try to fix permissions.
2022-04-18 22:54:00 +02:00
Felix Fontein
f01dacd6cf
Looks like we forgot to add the new modules to the action_group. (#209) 2021-09-18 17:07:35 +02:00
Felix Fontein
1156db420d
Add collection-side support for the docker action group. (#17) 2020-11-01 17:04:48 +01:00
John R Barker
42315baa74 Initial commit 2020-10-30 07:05:51 +01:00