Commit Graph

130 Commits

Author SHA1 Message Date
patchback[bot]
85eeee8186
docs: Fix json path in asserts (#560) (#561)
##### SUMMARY

The current path to the running state does not include `output.services.` which it should.

##### ISSUE TYPE

- Docs Pull Request

+label: docsite_pr

(cherry picked from commit c24ea78f6e)

Co-authored-by: David Jack Wange Olrik <david@olrik.dk>
2023-01-20 13:29:34 +01:00
patchback[bot]
14ec6c5d11
Improve envvar fallback handling. (#554) (#555) (#558)
(cherry picked from commit 4e6ac335f3)
(cherry picked from commit 40bef226c0)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-14 08:42:21 +01:00
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
patchback[bot]
b1e3d25d96
Fix error handling. (#546) (#547)
(cherry picked from commit 18091193de)

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-01-05 21:15:18 +01:00
Felix Fontein
e2053d7cc8
Improve container detection. (#522) (#524)
(cherry picked from commit e87b327764)
2022-12-06 08:31:25 +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]
7abd55adba
Fix non-matching defaults. (#494) (#495)
(cherry picked from commit 1ac3a99e7c)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-11-01 19:20:29 +01:00
patchback[bot]
ce8e33153c
added documentation to indicate docker_swarm_service does not currently support operating on stack based services. (#491) (#492)
(cherry picked from commit df864221d6)

Co-authored-by: James A. Robinson <jim.robinson@gmail.com>
2022-10-26 13:13:23 +02:00
patchback[bot]
f50c4ea538
Improve docker_compose example (#470) (#473)
* Improve compose docs.

* Also adjust inline v1 example.

(cherry picked from commit 3b41e7d6a8)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-08 06:43:52 +02:00
patchback[bot]
abba2bf73d
Clarify that BuildKit / buildx cannot be used with docker_image. (#468) (#471)
(cherry picked from commit 9458bc6e62)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-08 06:38:22 +02:00
patchback[bot]
ee48f36269
Fix error formatting bug. (#448) (#449)
(cherry picked from commit f513ba2c59)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-12 14:15:36 +02:00
patchback[bot]
edf1953fd5
Improve API version handling. (#389) (#391)
(cherry picked from commit a44e0736cf)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-20 07:58:38 +02:00
patchback[bot]
23cefae716
Remove trailing space (#375) (#377)
* Remove trailing space

* Update plugins/modules/docker_compose.py

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

Co-authored-by: Garrit Franke <32395585+garritfra@users.noreply.github.com>
2022-05-27 10:44:30 +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]
31966e90a4
Avoid breakage with Python 3.13. (#354) (#355)
(cherry picked from commit fb55b1d780)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-19 07:07:46 +02:00
Felix Fontein
7a54431495
[stable-1] Add PSF-license.txt file (#352)
* Add PSF-license.txt file. (#350)

(cherry picked from commit 6adc7bddf3)

* Update with actual CPython 3.9.5 license. (#351)

(cherry picked from commit b6f9d853f9)
2022-05-16 09:15:01 +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]
f36b6ee7fd
Update docker module documentation for log_options (#317) (#318)
* Update docker module documentation for log_options

Add that log_driver must be specified for log_options to take effect

* Update plugins/modules/docker_container.py

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

Co-authored-by: addisonshelley <102306748+addisonshelley@users.noreply.github.com>
2022-03-27 16:08:29 +02:00
Felix Fontein
6a8ba02b5b
[stable-1] docker_api connection plugin: adjust to ansible-core 2.13 (#315)
* Adjust docker_api plugin to ansible-core 2.13. (#308)

(cherry picked from commit b353a39ada)

* Remove 2.2.0 additions, adjust changelog URL.
2022-03-24 06:32:21 +01: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]
d6121fce86
Fix warning/error extraction. (#305) (#306)
(cherry picked from commit ba5e6f89f3)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-03-14 21:13:28 +01:00
patchback[bot]
febdace4ee
Try to make more compatible with podman-docker. (#292) (#298)
(cherry picked from commit 9cd46a7d41)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-12 08:29:16 +01:00
patchback[bot]
fd81f1d008
More small docs fixes. (#281) (#282)
(cherry picked from commit fbbc0898ed)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-10 08:27:12 +01:00
patchback[bot]
f4d3188199
Improve documentation (#278) (#279)
* Improve documentation.

* More fixes.

(cherry picked from commit 3d20ba1bc2)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-09 15:12:51 +01:00
patchback[bot]
3465a8371f
Fix comment. (#272) (#273)
(cherry picked from commit d4b7ec0a9a)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-06 15:10:43 +01:00
patchback[bot]
6e907dbde5
Fix unintended breaking change by vendoring distutils.version. (#269) (#270)
(cherry picked from commit 264f5238c7)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-05 22:04:43 +01:00
patchback[bot]
8ac6ad52a1
Added cap_add to the documentation for capabilities for easier search (#265) (#268)
* added cap_add to the documentation for capabilities for easier search comming from docker

* added equivalent syntax for docker cli and compose to capabilities docs

* added equivalent syntax for docker cli and compose to capabilities docs

(cherry picked from commit 15ab747d86)

Co-authored-by: Richard James Acton <richardjacton@pm.me>
2022-01-05 13:35:27 +01:00
patchback[bot]
b57a73e2bf
Prepare for distutils.version being removed in Python 3.12 (#258) (#260)
* Prepare for distutils.version being removed in Python 2.12.

* Fix copy'n'paste error.

* Fix import.

* Re-add Loose prefix.

* Fix Python version typo.

* Improve formulation.

* Move message into own line.

* Fix casing, now that the object is no longer called Version.

(cherry picked from commit 4b235a2607)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-12-24 12:15:43 +01:00
patchback[bot]
16934ef269
Get rid of distutils.spawn. (#257) (#259)
(cherry picked from commit 93ea131f30)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-12-24 11:37:00 +01:00
patchback[bot]
6dba5abdbc
Set minimal Docker API version for chdir to 1.35. (#253) (#256)
(cherry picked from commit 5a23c4d336)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-12-22 17:32:42 +01:00
patchback[bot]
9e3c50a2b9
Minor fixes to nsenter connection plugin (#249) (#251)
* Minor fixes to nsenter connection plugin

- Ensure the nsoption_pid option is retrieved in _connect instead of
  __init__ to prevent a crasher due to initialization order
- Replace the use of --all-namespaces with specific namespaces to
  support compatibility with Busybox nsenter (for example, Alpine)

* minor tidy

* Fix PEP8 violation

* Changelog fragment

* Update changelogs/fragments/249-nsenter-fixes.yml

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

Co-authored-by: Jeff Goldschrafe <jeff.goldschrafe@flatiron.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d224752cf1)

Co-authored-by: Jeff Goldschrafe <jgoldschrafe@users.noreply.github.com>
2021-12-09 06:01:43 +01:00
patchback[bot]
9f36cf139c
docker_container_exec: improve handling of chdir option (#243) (#247)
* Only pass chdir on when it is provided, and prevent this option from being used for Docker SDK for Python < 3.0.0.

* Also fix docker_api connection plugin.

(cherry picked from commit bed775c4ea)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-11-30 12:20:47 +01:00
patchback[bot]
f8c04cb990
Fix docs issues. (#232) (#233)
(cherry picked from commit 5233936262)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-11-09 20:34:18 +01:00
Felix Fontein
a9b238ee81
Emphasize that docker_compose requires docker-compose < 2.0.0. (#217) 2021-10-05 07:30:41 +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
8e1c9f890a
docker_containers inventory: fix wrong default mentioned in docs, add fallback example (#194)
* Fix wrong default mentioned in docs.

* Add fallback example.
2021-08-26 08:32:50 +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
930f9d1bcd
Improve error message on import errors. (#188) 2021-08-02 21:04:25 +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
03f649f43c
docker_compose - Fix startup errors for docker-compose versions <1.17.0 (#182)
* Initial Commit

* Adding changelog fragment

* Applying review suggestions
2021-07-31 11:37:02 +02:00
Felix Fontein
72fb3a5d1a
Fix check_mode for some _info modules. (#183) 2021-07-28 21:49:15 +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
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
badcd61a74
Replace ansible.module_utils._text by ansible.module_utils.common.text.converters. (#164) 2021-06-26 13:39:51 +02:00