Commit Graph

220 Commits

Author SHA1 Message Date
Felix Fontein e60ce69102 Rewrite the docker_prune module (#410)
* Rewrite the docker_prune module.

* Improve error messages.
2022-07-06 21:47:43 +02:00
Felix Fontein 18fdd04782 Rewrite the docker_network_info module (#409)
* Rewrite the docker_network_info module.

* Improve error messages.
2022-07-06 21:47:37 +02:00
Felix Fontein 4c026307fb Rewrite the docker_network module (#408)
* Rewrite the docker_network module.

* Update plugins/modules/docker_network.py

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

* Improve error messages.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2022-07-06 21:47:32 +02:00
Felix Fontein a406b08981 Rewrite the docker_login module (#407)
* Rewrite the docker_login module.

* Improve error messages.
2022-07-06 21:47:27 +02:00
Felix Fontein f82c8401c2 Rewrite the docker_image_load module (#406)
* Rewrite the docker_image_load module.

* Improve error messages.
2022-07-06 21:46:19 +02:00
Felix Fontein e4f3402035 Rewrite the docker_image_info module (#405)
* Rewrite the docker_image_info module.

* Improve error messages.
2022-07-06 21:46:14 +02:00
Felix Fontein 4f2f45b953 Rewrite the docker_image module (#404)
* Rewrite the docker_image module.

* Improve error messages.
2022-07-06 21:46:02 +02:00
Felix Fontein 9e168b75cf Rewrite the docker_host_info module (#403)
* Rewrite the docker_host_info module.

* Improve error messages.
2022-07-06 21:45:57 +02:00
Felix Fontein 37ff980a44 Rewrite the docker_container_info module (#402)
* Rewrite the docker_container_info module.

* Improve error messages.

* Remove wrong requirement.
2022-07-06 21:45:51 +02:00
Felix Fontein 1101997844 Rewrite the docker_container_exec module (#401)
* Rewrite docker_container_exec.

* Improve error messages.
2022-07-06 21:45:44 +02:00
Felix Fontein 9e57f29b3b Refactoring. (#415) 2022-07-03 13:28:11 +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
(https://github.com/docker/docker-py/tree/a48a5a9647761406d66e8271f19fab7fa0c5f582)
and the version before Python 2.7 support was removed
(https://github.com/docker/docker-py/tree/650aad3a5fb84059b392ad450f760ed08143ae3f),
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 21d112bddb Unvendor distutils.version (#271)
* Unvendor distutils.version.

* Document breaking change.

* Update comment, add StrictVersion.
2022-07-02 15:06:58 +02:00
Felix Fontein bc64aef5ca Revert "Revert "Remove deprecated functionality. (#363)""
This reverts commit e6d597b539.
2022-07-02 14:28:31 +02:00
Felix Fontein 6206976dbb Revert "Revert "Remove deprecations from docker_container, bump collection version to 3.0.0 (#399)""
This reverts commit 57e19ca596.
2022-07-02 14:28:27 +02:00
Felix Fontein 86011cdfdf Release 2.7.0. 2022-07-02 14:22:03 +02:00
Felix Fontein 45f3657fb6 Prepare 2.7.0. 2022-07-02 14:21:47 +02:00
Felix Fontein e6d597b539 Revert "Remove deprecated functionality. (#363)"
This reverts commit 209aeb57fd.
2022-07-02 14:18:53 +02:00
Felix Fontein 57e19ca596 Revert "Remove deprecations from docker_container, bump collection version to 3.0.0 (#399)"
This reverts commit 49ce0a3cb1.
2022-07-02 14:18:48 +02:00
Felix Fontein 7b46e4d414 Deprecate all API versions until 1.24 (#397)
* Deprecate all API versions until 1.24.

* Fix newlines.
2022-07-02 14:18:14 +02:00
Felix Fontein 49ce0a3cb1 Remove deprecations from docker_container, bump collection version to 3.0.0 (#399)
* Remove deprecated features in docker_container.

* Bump collection version to 3.0.0.

* Remove 'published_ports: all' tests.
2022-07-01 19:16:22 +02:00
Felix Fontein 209aeb57fd Remove deprecated functionality. (#363) 2022-07-01 19:02:22 +02:00
Felix Fontein 00ddbbdeb2 Deprecate Python 2.6 (#388)
* Deprecate Python 2.6 support.

* Document deprecations in README.
2022-06-30 20:47:46 +02:00
Felix Fontein f41d7ac1b8 Move common utility code to plugins.module_utils.util (#390)
* Move common utility code to plugins.module_utils.util.

* Also adjust plugins.

* Fix import.
2022-06-20 18:39:13 +02:00
Felix Fontein a44e0736cf Improve API version handling. (#389) 2022-06-20 07:34:38 +02:00
Felix Fontein 01ca3f0e1c Release 2.6.0. 2022-05-24 12:50:19 +02:00
Rodrigo Candido Gryzinski 497c2fda91 Add image_label_mismatch parameter to docker_container (#370)
* Add image_label_mismatch to docker_container

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Test image_label_mismatch error message

* Add change fragment for image_label_mismatch

* Break long line in docker_container.py for pep-8 compliance

* pep8 compliance

* Update changelogs/fragments/370-add-image-label-mismatch.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* fix: add expected_labels to parameters_map in docker_container

* Apply suggestions from code review

* Apply suggestions from code review

* Update tests/integration/targets/docker_container/tasks/tests/options.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-24 08:35:33 +02:00
Felix Fontein 9580c25579 Deprecate docker-compose EE dependency. (#373) 2022-05-24 08:11:31 +02:00
Felix Fontein 184dd63e55 Prepare 2.6.0 release. 2022-05-24 07:48:07 +02:00
Felix Fontein 401a76ff00 docker_container: fail if there are too many parts in a parsed port (#367)
* Fail if there are too many parts in a parsed port.

* Add tests.

* Prevent bad parsing.
2022-05-22 17:20:05 +02:00
Felix Fontein 1425faadd0 Deprecate Ansible 2.9 and ansible-base 2.10 support. (#361) 2022-05-20 14:46:07 +02:00
Felix Fontein 7e710f743d Bump deprecations we forgot to remove in 2.0.0. (#362) 2022-05-20 14:45:52 +02:00
Felix Fontein fb55b1d780 Avoid breakage with Python 3.13. (#354) 2022-05-18 22:22:50 +02:00
Felix Fontein 929a2f6e5f Release 2.5.1. 2022-05-16 12:27:39 +02:00
Felix Fontein 6adc7bddf3 Add PSF-license.txt file. (#350) 2022-05-16 07:35:23 +02:00
Felix Fontein 71fb48b7c5 Prepare 2.5.1 release. 2022-05-16 07:11:56 +02:00
Felix Fontein 1848142d4f Release 2.5.0. 2022-05-14 12:11:04 +02:00
Felix Fontein e5ba309f03 Prepare 2.5.0 release. 2022-05-11 07:28:08 +02:00
Sasha Jenner c63ef4116d Support --template-driver for docker_config (#332) (#345)
* initial templating changes

* adding docs

* author

* responding to pr comments

* testing for idempotency

* using template_driver rather than templating

* adding explicit idem check

* remove local testing changes

* bug fix

* fixing idempotency

Co-authored-by: Sasha Jenner <sasha.jenner@cba.com.au>
2022-05-11 07:26:59 +02:00
chrische 98b227003e docker_swarm: adds data_path_addr option for swarm init and swarm join (#344)
* adds data_path_addr option for swarm init and swarm join. (ansible-collections/community.docker#339)

* adds changelog fragment (ansible-collections/community.docker#339)

* adds formatting to changelog entry

Co-authored-by: Felix Fontein <felix@fontein.de>

* adds version to doc entry in ansible_swarm

Co-authored-by: Felix Fontein <felix@fontein.de>

* rewrites doc entry to formal language

Co-authored-by: Felix Fontein <felix@fontein.de>

* Correct docker api version (src: docker api docs)

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-09 20:37:27 +02:00
Felix Fontein 2cef29e2e1 Release 2.4.0. 2022-04-25 21:32:27 +02:00
Felix Fontein 497453aab2 Prepare 2.4.0 release. 2022-04-25 20:43:54 +02:00
Brian Coca 6679eee41e docker connection: handle version and docker_args (#327)
* handle version and docker_args

* Remove breaking change.

* Add changelog fragment.

* Fix unit tests.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-25 20:35:33 +02:00
Shane St Savage eaacf6c8f6 Support getting container output from local logging driver (#337)
The `local` [Docker logging driver](https://docs.docker.com/config/containers/logging/local/) is a new-ish, optimized local logging driver that improves upon json-file. Since logs written using `local` can still be accessed through the Docker daemon API, all that is needed here is to add to the supported list.
2022-04-24 21:39:59 +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 4be3a64f8a Release 2.3.0. 2022-03-28 20:56:14 +02:00
Felix Fontein 14d3fcd7d2 Prepare 2.3.0 release. 2022-03-27 21:48:06 +02:00
Felix Fontein 3c7c496e67 Implement connection reset. (#312) 2022-03-22 07:13:39 +01:00
Felix Fontein b353a39ada Adjust docker_api plugin to ansible-core 2.13. (#308) 2022-03-22 07:11:32 +01:00