Commit Graph

303 Commits

Author SHA1 Message Date
Felix Fontein 37d0a44c0b Adjust descriptions. (#766) 2024-01-20 14:13:11 +01:00
Felix Fontein 648e0652d5 mac_address no longer works with Docker API v1.44+. (#764) 2024-01-20 14:06:29 +01:00
Felix Fontein c3322fd55b Fix typo. 2024-01-17 12:58:20 +01:00
Felix Fontein 6082efc855 Improve docs sharing for docker_compose_v2* modules; fix examples and return docs for docker_compose_v2_pull (#761)
* Move more common documentation to docs fragment.

* Fix examples and return values for docker_compose_v2_pull.

* Remove ignore.
2024-01-17 07:53:44 +01:00
Felix Fontein 22d956efa8 Allow to pass --build or --no-build to 'docker compose up'. (#760) 2024-01-17 06:57:35 +01:00
Simon Baerlocher 98a74b1f9c feat: add docker-compose services support. (#758)
* feat: add docker-compose services support.

fix: typo

* fix: error

* fix: ci Job

* feat: add argument_spec

* fix: whitespace

* feat: refactored docker_compose_v2 in response to feedback
2024-01-16 19:07:12 +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 307dc4045a Add docker_compose_v2_pull module (#751)
* Add docker_compose_v2_pull module.

* Improve and extend parsing of events.

* Add ignores.

* --policy is only available since Compose 2.22.0.
2024-01-13 14:36:26 +01:00
Felix Fontein 8ca5e2f810 Extract more common code and docs fragment for Docker Compose. (#748) 2024-01-07 18:17:10 +01:00
Felix Fontein cb4dd2fed1 docker_compose_v2: move some code to module_utils (#747)
* Move some code to module_utils.

* Add unit tests.

Test cases are auto-generated from integration test logs.

* Rename ResourceEvent → Event.
2024-01-07 16:17:31 +01:00
Felix Fontein eed89f32eb docker_compose_v2: allow to specify pull policy; parse pull events; improve error handling; always return stderr (#746)
* Add pull option for 'docker compose up'.

* Improve dry-mode event parsing, and also parse pull-related events.

* Improve error handling, and add first tests.

* Fix action status documentation.

* Add more tests.

* Always return stderr.

This makes debugging misbehavior a lot easier since you can see
what 'docker compose' actually returned.

* Reformat existing tests.
2024-01-07 08:45:20 +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 56bbef2b44 Fix example. 2024-01-01 18:09:08 +01:00
Felix Fontein 02bb4ceaf7 Update docs. 2023-12-31 15:14:01 +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 0812d0b495 Support labels and shm_size for image build. Allow to specify (swap) memory limits in other units than bytes. (#727) 2023-12-28 21:42:55 +01:00
Felix Fontein c4c347c626 Add proper platform handling. (#705) 2023-12-10 09:03:32 +01:00
Felix Fontein 80e39f84d8 Update docker_compose docs to indicate that it is incompatible with Docker SDK for Python 7+. (#717) 2023-12-09 14:40:15 +01:00
Felix Fontein 907dc28f73 Deprecate default 'ignore' of 'image_name_mismatch'. (#703) 2023-12-07 12:32:50 +01:00
Alexander Jähnel 4c220c4d74 fix(community.docker.docker_volume): labels can be none (#702)
* fix(community.docker.docker_volume): labels can be none

catch case where volume labels can are done (default) eg:

$ docker volume inspect foo
[    
    {
        "CreatedAt": "2023-11-11T12:55:23+01:00",                                                                                                            
        "Driver": "local",
        "Labels": null,
        "Mountpoint": "/var/lib/docker/volumes/foo/_data",
        "Name": "foo",
        "Options": {},
        "Scope": "local"
    }
]

* Update plugins/modules/docker_volume.py

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

* add(community.docker.docker_volume): changelog fragment

* Update changelogs/fragments/702-docker-volume-label-none.yaml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-11-12 11:19:56 +01:00
Felix Fontein 14683421b5 Fix failing sanity test. (#700) 2023-11-08 13:23:39 +01:00
Felix Fontein 1c66f880ee Fix typos, improve markup, improve scenario guide (#699)
* Fix typos.

* Improve markup.

* Mention missing 'new' modules in scenario guide.
2023-10-29 08:30:24 +01:00
Felix Fontein fbc2750b6a Do not pass data_path_addr for older Docker SDK for Python versions. (#696) 2023-10-14 23:48:46 +02:00
Ethan Paul 78801088ae Update docker_stack_info module documentation to clarify functionality (#693)
* Update documentation to reflect module functionality

Clarify that this module is used for accessing information on all stacks
Add link to docker_stack_task_info module for users looking for detailed info on a single stack

Fixes #690

* Remove trailing whitespace, add trailing period.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-10-07 14:04:59 +02:00
Felix Fontein d266c69ddc Fix documentation (#684)
* Fix documentation.

* Fix line length.
2023-09-10 21:27:26 +02:00
Felix Fontein 6f6dd14492 Ignore sanity check. (#679) 2023-08-11 09:01:39 +02:00
bastantoine e21d6d380c Fix example of docker-compose module (#674) 2023-07-25 10:09:47 +02:00
Felix Fontein 024bdec919 Use semantic markup (#645)
* Use semantic markup.

* Linting.

* Define docsite targets.

* Forgot one env var.

* Add array stubs.
2023-06-22 07:01:31 +02:00
Kendi 861988fd36 Update docker_container_exec.py documentation (#642)
Should be or not and
2023-06-01 12:59:49 +02:00
Felix Fontein 748d619fb2 Fix EndpointSpec KeyError. (#637) 2023-05-26 17:58:09 +02:00
Felix Fontein 7bdb2127e0 Improve examples: use FQCNs and always add name: to tasks (#624)
* Improve examples: use FQCNs and always add name: to tasks.

* Improvements.

Co-authored-by: Don Naro <dnaro@redhat.com>

---------

Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-15 21:41:58 +02:00
Felix Fontein 245ab76b09 Warn that SSLSocket cannot send close_notify TLS alerts (#621)
* Warn that SSLSocket cannot send close_notify TLS alerts.

* Improve formulation.

Co-authored-by: Don Naro <dnaro@redhat.com>

---------

Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-15 21:41:23 +02:00
Felix Fontein 6187068ee5 Improve time units of docker_swarm documentation. (#623) 2023-05-13 15:25:42 +00:00
Ville Ojamo 634da44f67 docker_swarm: document docker_node module for manager removal (#602)
* docker_swarm: document manager removal

Add note that community.docker.swarm_node needs to
be used to demote a manager before it can be removed.

Fixes #601.

* docker_swarm: improve wording

* docker_swarm: fix formatting
2023-04-08 18:09:57 +02:00
Felix Fontein d0a3e587a5 More true/false normalization. (#597) 2023-03-06 22:17:13 +01:00
Felix Fontein 08bfcf7e5f docker_prune: correctly return 'changed' result (#593)
* Correctly return 'changed' status.

* Extend tests.

* Fix typo.
2023-02-24 17:24:16 +01:00
Kristof Mattei d2f551fc5d fix: fix tmpfs_size and tmpfs_mode not being set (#580)
* fix: fix tmpfs_size and tmpfs_mode not being set

* fix: wrong file

* fix: add changelog fragment

* fix: update changelog fragment to match formatting

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-02-10 14:05:09 +01:00
Felix Fontein 54a3dc151d Remove unneccessary imports (#575)
* Remove unneccessary imports.

* Add noqas.
2023-02-09 15:25:45 +01:00
Felix Fontein 421bae419d Improve current_container_facts docs (#574)
* Improve current_container_facts docs.

* [TEMP] Run current_container_facts module in CI outside of ansible-test.

* Revert "[TEMP] Run current_container_facts module in CI outside of ansible-test."

This reverts commit 1cdd3e3550.

* Describe current state of return values.
2023-02-03 17:13:31 +01:00
David Jack Wange Olrik c24ea78f6e docs: Fix json path in asserts (#560)
##### SUMMARY

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

##### ISSUE TYPE

- Docs Pull Request

+label: docsite_pr
2023-01-20 13:19:33 +01:00
Felix Fontein b114d451fd Forgot to add version_added. 2023-01-14 11:19:42 +01:00
Felix Fontein c7cbec0163 docker_plugin: do not crash when plugin doesn't exist (#553)
* 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>
2023-01-13 20:49:06 +01: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 18091193de Fix error handling. (#546) 2023-01-05 09:42:42 +01:00
Felix Fontein 311926aaad Forgot to switch docs fragment for docker_container: it no longer depends on the Docker SDK for Python. (#544) 2023-01-01 21:54:35 +01:00
Felix Fontein faa7fef504 docker_host_info: allow to list all containers (#538)
* Allow to list all containers.

* Fix typo.
2022-12-27 21:39:17 +01:00