Commit Graph

127 Commits

Author SHA1 Message Date
patchback[bot]
8d19ad9f86
docker_plugin: do not crash when plugin doesn't exist (#553) (#556) (#557)
* Do not crash when plugin doesn't exist.

* Improve style.

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

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
(cherry picked from commit c7cbec0163)
(cherry picked from commit 0ffa3cc1d2)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-14 08:09:36 +01:00
Felix Fontein
935b02fad9 Don't uninstall docker. 2023-01-13 21:47:17 +01:00
Felix Fontein
d02aa960eb CI: improve Docker setup (#550)
* Cache has already been updated a few lines before.

* When skipping Docker cleanup, create flag to avoid the expensive part of the setup (including package manager cache update) to be run again.

(cherry picked from commit 134d32cae6)
2023-01-13 21:06:21 +01:00
Felix Fontein
74290165e9 [stable-2] Make current_container_facts work with newer Docker versions and latest ansible-test container changes (#512)
* Make current_container_facts work with newer Docker versions and latest ansible-test container changes (#510)

* Add more debug output.

* Add basic integration test.

* Split into lines.

* Fix docker detection, add podman detection.

ci_complete

* Improve regular expression.

* Document that this module is trying its best, but might not be perfect.

* Update comment.

(cherry picked from commit c2d84efccb)

* Remove new feature (podman support).

(cherry picked from commit 3da9aa3b9c)
2022-12-01 00:15:01 +01:00
patchback[bot]
403b4f4c64
Fix docker_container tty test. (#444) (#445)
(cherry picked from commit bd62f82ca5)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-11 22:29:11 +02:00
patchback[bot]
6d31c4e72d
Adjust to b1dd2af4ca. (#423) (#424)
(cherry picked from commit c00b4ec9be)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-07-12 17:12:21 +02:00
patchback[bot]
0cdc59f3e4
requests drops support for older Python. (#380) (#381)
(cherry picked from commit b3b543dd8d)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-11 20:36:31 +02:00
patchback[bot]
0466d43d03
docker_container: fail if there are too many parts in a parsed port (#367) (#371)
* Fail if there are too many parts in a parsed port.

* Add tests.

* Prevent bad parsing.

(cherry picked from commit 401a76ff00)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-22 17:42:05 +02:00
patchback[bot]
2bda93a682
CI: Replace the container used in the nsenter tests (#368) (#369)
* Replace the container used in the nsenter tests.

* Improve connection tests.g

* Use quay.io/ansible/ansible-runner:devel instead.

(cherry picked from commit ab2d33aa99)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-21 19:33:30 +02:00
patchback[bot]
75faaff9dc
certifi dropped Python 2 support. (#356) (#357)
(cherry picked from commit 9c7415e0e7)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-19 07:40:05 +02:00
Felix Fontein
c4253b440d Install community.general 4.x.x which still supports Ansible 2.9. 2022-05-08 19:06:18 +02:00
Felix Fontein
e050e43ce8
[stable-1] docker connection: handle version and docker_args (#341)
* 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>
(cherry picked from commit 6679eee41e)

* Fix tests.

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-04-25 21:01:02 +02:00
patchback[bot]
d7b5f571fc
Switch from antsibull to antsibull-docs. (#334) (#335)
(cherry picked from commit ca2e46131f)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-10 10:58:57 +02:00
patchback[bot]
a2bb8a2620
Remove 'warn:' that's removed in ansible-core 2.14. (#328) (#329)
(cherry picked from commit b362bdfd88)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-01 23:06:06 +02:00
patchback[bot]
9241ecadef
Replace antsibull-lint collection-docs with antsibull-docs lint-collection-docs. (#322) (#323)
(cherry picked from commit 6f0e1149fd)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-30 08:13:32 +02:00
Felix Fontein
30c00d4741
[stable-1] docker connection plugin: fix config docs and update to use config system (#313)
* docker connection plugin: fix config docs and update to use config system (#297)

* fix config docs and update to use config system

 wean off play_context which did not have the correct data in all cases

* moar fixes

* Update plugins/connection/docker.py

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

* updated for backwards compat

* badmergeresolution

* makeitworks

* attempt to fix unit test

* mocking it# No more than 50 chars. #### 50 chars is here: #

* Update plugins/connection/docker.py

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

* Update plugins/connection/docker.py

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

* Update plugins/connection/docker.py

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

* Update plugins/connection/docker.py

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

* Update plugins/connection/docker.py

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

* Update plugins/connection/docker.py

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

* nomock

* remove bad paste

* properly load connection to initialize config

* initizlie docker args

* Fix bugs.

* Call _set_conn_data() when needed.

* Cache result of _get_docker_remote_user() now that it is called multiple times per task.

* Fix unit tests.

* list.clear() is Python 3...

* Add changelog.

* Call _set_conn_data() also in _connect().

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 37a3264042)

* Remove 2.2.0 additions.

* Remove unnecessary fragment, adjust URL.

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2022-03-24 06:32:06 +01:00
patchback[bot]
d7a6ba7fc3
Don't mask return value. (#299) (#300)
(cherry picked from commit 078afc9769)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-14 21:10:08 +01:00
patchback[bot]
6d99d16a85
Try to fix CentOS 8 in CI - at least a bit. (#287) (#288)
(cherry picked from commit 946f1a7322)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 21:54:28 +01:00
patchback[bot]
a0134c5486
Restrict PyNaCL to 1.4.x on RHEL8 when using Python 3.6 (#275) (#276)
* Restrict PyNaCL to 1.4.x on RHEL8 when using Python 3.6.

* Fix typo.

(cherry picked from commit f94ba4cef3)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-08 14:19:21 +00:00
patchback[bot]
d23ef4ac31
Fix collection dependency installation in CI. (#239) (#240)
(cherry picked from commit abd057f447)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-11-19 06:59:35 +01:00
patchback[bot]
3029ad313a
Replace Bash codecov uploader by new Python codecov uploader. (#235) (#236)
ci_coverage

(cherry picked from commit 3961ad3763)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-11-13 12:18:47 +01:00
patchback[bot]
02dcfb8b63
Explicitly install iptables. (#227) (#228)
(cherry picked from commit 3c53e763a1)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-11-03 22:19:31 +01:00
patchback[bot]
482acec09c
Fix wrong FQCNs. (#225) (#226)
(cherry picked from commit ec82806a59)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-17 18:25:40 +02:00
patchback[bot]
f77c995798
Fix shellcheck error. (#220) (#221)
(cherry picked from commit 9800da148a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-08 15:10:40 +02:00
patchback[bot]
087392847d
Fix CI (docker_container tests fail because of missing ipaddress) (#218) (#219)
* Use stdlib ipaddress, resp. install when needed.

* Make sure facts on controller are available.

(cherry picked from commit f4b1d34357)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-10-07 13:40:50 +02:00
Felix Fontein
4ca348ea28 Prepare ansible-core devel branch version bump that is planned for later today. 2021-09-24 18:45:54 +02:00
Ajpantuso
b5263ccbd0
Initial commit (#208) 2021-09-17 17:00:14 -04:00
Felix Fontein
5d861004db
docker_config and docker_secret: add data_src option (#203)
* Add data_src options to docker_config and docker_secret.

* Add examples.

* Fix test.

* Another fix.
2021-09-12 09:42:03 +02:00
Felix Fontein
668f77d7d2
Make sure the nginx config and password files are readable by everyone. (#202) 2021-09-11 12:21:27 +02:00
Felix Fontein
40f61ae8c8
docker_network: improve test failure debugging (#201)
* Show inspection results for all Docker networks before running docker_network tests.

* AZP/Docker seems to prefer networks in 172.0.0.0/8, so we use 10.0.0.0/8 for our tests.

* Fix use of wrong variable.
2021-09-10 22:10:35 +02:00
Felix Fontein
5a3ce51049
Improve CI (#198)
* Use remote temp path, replace remote lookups.

* Copy local files.

* Change docker resource name prefix from ansible-test to ansible-docker-test to avoid collision with ansible-test's containers.

* Fix typos.

* We don't neceessarily have a TTY.

* Use hopefully less collision-likely subnet.

* More collision avoidance.

* More changes.
2021-09-08 09:43:35 +02:00
Ajpantuso
4dfc3ae5d7
docker_compose - Fix idempotency when services have no enabled profiles (#192)
* Initial Commit

* Adding integration tests

* Fixing integration and adding changelog fragment
2021-08-20 13:33:35 +02:00
Felix Fontein
6f52747693
docker_container: fix handling of command and entrypoint in a backwards-compatible way (#186)
* Fix handling of command and entrypoint in a backwards-compatible way.

* Fix copy'n'paste error.

* Fix some more.

* Improve documentation.

* Keep command and entrypoint as lists and not as strings.

* Simplify code, since we're already emitting the deprecation warning in this case during parameter processing.

* Change default only in community.docker 3.0.0.

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

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

* Apply suggestion to more places.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2021-08-02 19:31:46 +02:00
Jeff Goldschrafe
2a9bc7f74e
Add nsenter connection plugin (#173)
* Add nsenter connection plugin

* Fixes

* oops

* Pass file I/O through nsenter, removing volume mount

* minor logging cleanup for consistency's sake

* Fix pylint flag

* Update plugins/connection/nsenter.py

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

* Update plugins/connection/nsenter.py

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

* Update plugins/connection/nsenter.py

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

* Update plugins/connection/nsenter.py

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

* Update plugins/connection/nsenter.py

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

* Fix note formatting

* Revert string_types change

* Update tests/integration/targets/connection_nsenter/aliases

* Update tests/integration/targets/connection_nsenter/runme.sh

* Apply suggestions from code review

* Update tests/integration/targets/connection_nsenter/runme.sh

* Update tests/integration/targets/connection_nsenter/runme.sh

* Apply suggestions from code review

* Update tests/integration/targets/connection_nsenter/runme.sh

* Update tests/integration/targets/connection_nsenter/aliases

* Update plugins/connection/nsenter.py

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

* Update plugins/connection/nsenter.py

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

* Update plugins/connection/nsenter.py

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

* Update plugins/connection/nsenter.py

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

* Remove specific pipelining support

* Update plugins/connection/nsenter.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-08-02 08:17:53 +02:00
Ajpantuso
b2430f756f
Allowing anonymous volumes via mounts option (#181)
* Initial Commit

* Adding changelog fragment
2021-07-27 17:35:40 +00:00
Felix Fontein
e2785de840
Make sure that 'container' is returned in more circumstances, and improve documentation when it is actually returned (#178)
* Make sure that 'container' is returned in more circumstances, and improve documentation when it is actually returned.

* Fix typos.
2021-07-24 21:01:14 +02:00
Ajpantuso
9b661a6ac2
docker_compose - add env_file option (#174)
* Initial commit

* Adding changelog and fixing docs

* Fixing integration tests

* Restricting minimum docker-compose versions for tests

* Applying initial review suggestions
2021-07-16 19:01:20 +02:00
Lauri Tirkkonen
a0f2091e6a
put example addresses in actual RFC1918 range (#170)
172.1/16, 172.3/16 and 172.4/16 are not in the 172.16/12 range.

https://datatracker.ietf.org/doc/html/rfc1918#section-3
2021-07-01 19:06:18 +02:00
Ajpantuso
072d96ca62
docker_compose - Adding profiles option. (#167)
* Initial commit

* fixing tests

* Adding changelog fragment
2021-06-28 20:54:54 +02:00
Felix Fontein
1cdf8d5620
Forgot one change in #164. (#166) 2021-06-27 21:21:01 +02:00
Ajpantuso
49cb513244
docker_container - adding publish_all_ports option (#162)
* Initial commit

* Adding changelog fragment

* Updating deprecation notice

* Adding integration test

* Applying second round of review suggestions

* Updating docs and cleaning up integration tests

* Updating test loop logic
2021-06-27 16:51:30 +02:00
Felix Fontein
2d5875a397 Revert "Remove superfluous file."
This reverts commit d3d8f33ec5.
2021-06-26 14:27:58 +02:00
Felix Fontein
d3d8f33ec5 Remove superfluous file. 2021-06-26 13:51:08 +02:00
Ajpantuso
825a4f74d3
docker_plugin - adding alias option and general cleanup (#161)
* Initial Commit

* Adding changelog fragment
2021-06-25 21:45:53 +02:00
Ajpantuso
49c8fd0aa5
docker_host_info - Allow filters which are passed as lists (#160)
* Initial Commit

* Adding integration tests

* Adding example in docs

* Adding changelog fragment

* Applying initial review suggestions
2021-06-22 22:27:38 +02:00
Felix Fontein
af2b3b0493
docker_compose: fix idempotency for stopped services (#159)
* Always use |= instead of = when updating changed status.

* Fix idempotence bug.

* Add changelog fragment.
2021-06-22 12:07:50 +02:00
Felix Fontein
22bc8da783
Make extra sanity test runner produce ansibullbot and JUnit output. (#154) 2021-06-14 07:24:01 +02:00
Felix Fontein
fc241019b5
CI: Remove scripts that are no longer needed (#153)
* Remove scripts that are no longer needed.

ci_complete

* Remove sanity ignores.
2021-06-13 22:11:57 +02:00
Felix Fontein
eba726b42e
Add more docker_compose tests (#151)
* Add basic changed test.

* Add start/stop tests.
2021-06-07 07:24:41 +02:00
Felix Fontein
b775bac593
docker_image: allow to tag images by name, improve docs (#149)
* Add test to tag image with ID.

* Document that source=local also works with image IDs.

* Improve 'repository' documentation.

* Fix typo.

* Looks like a fix is needed to make this work.

* ...

* Avoid unnecessary re.search() calls.

* Add changelog fragment.

* Improve main description.

* Remove import.
2021-06-07 07:01:10 +02:00