Commit Graph

339 Commits

Author SHA1 Message Date
Felix Fontein
acf18f0ade
Add more CI checks (#1150)
* Enable mypy.

* Add flake8.

* Add pylint with a long list of ignores to be removed.
2025-10-07 19:37:16 +02:00
Felix Fontein
449b37e1c9
Fix docker_container_exec's detach=true. (#1145) 2025-10-07 18:49:20 +02:00
Felix Fontein
117271579e
Make all doc fragments, module utils, and plugin utils private (#1144)
* Make all doc fragments, module utils, and plugin utils private.

* Remove some unused and no longer needed imports.

This hopefully also fixes the CI issues, which do not happen locally for me...

* Fix formatting.

* Try to make CI happy, again.

* Fix imports.

* Lint.
2025-10-07 07:32:33 +02:00
Felix Fontein
d65d37e9e9 Reformat code with black and isort. 2025-10-06 18:34:59 +02:00
Felix Fontein
f45232635c
Python code modernization, 1/n (#1141)
* Remove unicode text prefixes.

* Replace str.format() uses with f-strings.

* Replace % with f-strings, and do some cleanup.

* Fix wrong variable.

* Avoid unnecessary string conversion.
2025-10-06 18:30:54 +02:00
Felix Fontein
1f2817fa20
Prepare 5.0.0 (#1123)
* Bump version to 5.0.0-a1.

* Drop support for ansible-core 2.15 and 2.16.

* Remove Python 2 and early Python 3 compatibility.
2025-10-05 20:22:50 +02:00
Felix Fontein
251e4eca49
Remove remaining usages of ansible.module_utils.six. (#1140) 2025-10-05 16:17:50 +02:00
Felix Fontein
ebe42308cc
Replace ansible.module_utils.six with own module utils in some cases (#1138)
* Replace ansible.module_utils.six with own module utils in some cases.

* Add ignore.txt entires.
2025-10-04 23:45:27 +02:00
Felix Fontein
1902e0fdf2
Avoid six in plugin code. (#1137) 2025-10-04 21:51:59 +02:00
Felix Fontein
82b3184605
Another try to add RHEL 10 to CI. (#1136) 2025-10-03 21:16:18 +02:00
Felix Fontein
2b5c06da20
CI: Start using Ubuntu VMs instead of RHEL VMs (#1128)
* Start using Ubuntu VMs instead of RHEL VMs.

* Use correct Python executable.

* Fix starting podman on non-RHEL systems.
2025-09-14 23:27:52 +02:00
Felix Fontein
93d165e10b
Restrict cffi on Python 2. (#1126) 2025-09-12 19:58:48 +02:00
Felix Fontein
1f53619edf
Add ignores necessary for ansible-core 2.20 if Python 2.7 is still supported by the collection. (#1122) 2025-08-28 21:15:43 +02:00
Felix Fontein
1ba34b9b7c
CI: Add Debian 13 Trixie (#1113)
* Add Debian 13 Trixie to CI.

* I don't think this is needed any longer.

* Debian: adjust way GPG signature is installed for Docker's software repo.
2025-08-10 20:11:54 +02:00
Felix Fontein
da76583d6b
Use distribution:3.0.0. (#1112) 2025-08-03 17:56:32 +02:00
Felix Fontein
cfd59ac9e5 Add Distribution 3.0.0 image. 2025-08-03 14:18:29 +02:00
tpourcelot
449448e820
docker_swarm_service: add support for replicated jobs (#1108)
* feat(docker_swarm_service): Add support for replicated jobs

* chore(docker_swarm_plugin): Fixes after review

* chore(docker_swarm_service): Add a check for minimum version

* chore(docker_swarm_service): Add changelog fragment for #1108

* fix(docker_swarm_service): Fix typo in version check

* Apply suggestions from code review

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

---------

Co-authored-by: Tristan Pourcelot <tristan.pourcelot@exatrack.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-03 13:12:29 +02:00
Felix Fontein
8365810b52
Move EE tests to antsibull-nox (#1100)
* Move EE tests to antsibull-nox.

* Make EE tests work.
2025-07-25 21:23:06 +02:00
Felix Fontein
e1347723d1
CI: Add stable-2.19 (#1095)
* Add ignore-2.20.txt.

* Add stable-2.19 to CI.
2025-07-01 07:30:08 +02:00
Felix Fontein
c8fc5bc175
Apparently Compose 2.37.3 + Docker 28.3.0 result in a behavior change. (#1093) 2025-06-25 22:00:42 +02:00
Felix Fontein
ae1d457b49
ContainerName is also missing in 2.37.1. (#1088) 2025-06-14 17:03:27 +02:00
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
72d827a9e2 Enable no-trailing-whitespace test. 2025-06-04 15:18:19 +02:00
Felix Fontein
38591969dd Use community.crypto 2.x.y on ubuntu2004. 2025-05-03 13:24:31 +02:00
Felix Fontein
295428167b
Use community.crypto 2.x.y for older ansible-core versions / Python versions. (#1076) 2025-05-01 12:30:07 +02:00
Felix Fontein
e0b9c45579
Re-enable RHEL 8 in CI (#1075)
* Re-enable RHEL 8 in CI.

* Skip podman on RHEL 8.
2025-04-28 21:42:31 +02:00
Felix Fontein
ad989c1942
docker_container_copy_into: add mode_parse option (#1074)
* Add mode_parse option.

* Make yamllint config strict.

* Lint.
2025-04-28 20:46:11 +02:00
Felix Fontein
424b39fe36 Since we require ansible-core >= 2.15, nothing before Python 2.7 is supported and used in tests anyway. 2025-04-27 12:24:53 +02:00
Felix Fontein
961acd9120 Remove no longer needed file. 2025-04-27 12:24:10 +02:00
Felix Fontein
2487d1a0bf Fix linting errors. 2025-04-26 12:39:00 +02:00
Felix Fontein
e20118b68f
Run extra sanity tests with nox. (#1068) 2025-04-19 17:54:12 +02:00
Felix Fontein
8694f488d7
CI: fix certificates for HTTPS connection tests (#1066)
* Try to fix CA cert for HTTPS connection tests.

* Try to fix leaf certificate.

* Add more properties.
2025-04-11 14:09:01 +02:00
Felix Fontein
a1e9412bed
Use new tools from community.internal_test_tools. (#1061) 2025-03-22 11:59:27 +01:00
Felix Fontein
635716c07b
docker_compose_v2: use --yes when available instead of -y (#1060)
* Use --yes if available.

* Add smoke test.
2025-03-21 22:05:10 +01:00
Felix Fontein
9730b2a3c3
Use shared unit test utils from community.internal_test_tools. (#1056) 2025-03-12 21:39:05 +01:00
Felix Fontein
9972eee967 Make sure that community.internal_test_tools is installed for unit tests. 2025-03-12 21:00:09 +01:00
Felix Fontein
fdb97428a3
Fix/improve tests (#1052)
* Improve unit test condition.

* Improve/fix tests.
2025-03-08 09:54:41 +01: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
20042ea780
Add basic podman tests to CI (#1040)
* Setup podman and run some basic tests with it.

* Clean up Docker setup.
2025-02-10 23:19:54 +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
9cc70f5202
Fix label sanitization error handling. (#1029) 2025-01-22 20:45:08 +00:00
Felix Fontein
9e26c4794e
docker_compose_v2: fix tests (#1027)
* Since docker-compose 2.32.2 present_3 is no longer changed.

This has been caused by https://github.com/docker/compose/pull/12442,
since that PR removes the "building" event.

* Remove deprecated 'version' fields.
2025-01-14 21:17:05 +01:00
Felix Fontein
993d66971d
CI: Try to get more targets for SSH connection test (#1026)
* Try to get more targets for SSH connection test.

* Install paramiko from system repos on CentOS 7.
2025-01-11 12:54:11 +01:00
Felix Fontein
29ff1241ce
Use multiple YAML documents for inventory plugin examples. (#1023) 2025-01-07 21:21:01 +01:00
Felix Fontein
1a218f3c5e Improve extra sanity test for docker action group. 2025-01-03 14:50:33 +01:00
Felix Fontein
8616e7f6f2
docker_image_build: work around strange behavior of docker buildx build when --output is provided (#1006)
* Work around strange behavior of docker buildx build when --output is provided.

* Adjust tests.

* Allow to pass multiple image names; correctly quote --output values.

* Return executed command.

* Adjust tests.
2024-12-14 21:32:33 +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
Maksim Vorobyev
e19812917d
Add 'ingress' option to docker_network module (#999)
* Add 'ingress' option to docker_network module

* sanity fixes

* add changelog fragment

* Update plugins/modules/docker_network.py

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

* Update changelogs/fragments/999-add-ingress-option-to-docker_network-module.yml

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

* Update plugins/modules/docker_network.py

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

* move 'ingress' tests to overlay.yml

* move Sworm init and Swarm cleanup to block

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-04 21:39:09 +01:00