* fix: map docker_swarm_service command/args to ContainerSpec.Args
docker service create IMAGE [COMMAND] [ARG...] places post-image tokens
into ContainerSpec.Args so the image ENTRYPOINT is preserved. The module
previously wrote command to ContainerSpec.Command, which replaced the
entrypoint and broke flag-style commands such as -config.file=...
Fixes#1044Fixes#212
* Add command_as_args option for CLI-compatible command mapping
Keep the historical default (command -> ContainerSpec.Command,
args -> ContainerSpec.Args) to avoid a breaking change. When
command_as_args=true, map command+args to ContainerSpec.Args to
match docker service create and preserve the image ENTRYPOINT.
Update docs, examples, unit tests for both modes, and the changelog
fragment. Addresses review feedback on #1307 / #1044.
* Update changelogs/fragments/1044-swarm-service-command-args.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_swarm_service.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_swarm_service.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_swarm_service.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_swarm_service.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_swarm_service.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_swarm_service.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/docker_swarm_service.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/1044-swarm-service-command-args.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: VedantMadane <vedant@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix IP address retrieval for registry setup.
* Adjust push detection to Docker 29.
* Idempotency for export no longer works.
* Disable pull idempotency checks that play with architecture.
* Add more known image IDs.
* Adjust load tests.
* Adjust error message check.
* Allow for more digests.
* Make sure a new enough cryptography version is installed.
* Add debug flag to failing task.
* Add more debug output.
* Fix pull idempotency.
* Revert "Add more debug output."
This reverts commit 64020149bf.
* Fix casing.
* Remove unreliable test.
* Add 'debug: true' to all tasks.
* Reformat.
* Fix idempotency problem for IPv6 addresses.
* Fix expose ranges handling.
* Update changelog fragment to also mention other affected modules.
* Re-enable typing and improve config.
* Make mypy pass.
* Improve settings.
* First batch of types.
* Add more type hints.
* Fixes.
* Format.
* Fix split_port() without returning to previous type chaos.
* Continue with type hints (and ignores).
* Remove __metaclass__ = type.
for i in $(grep -REl '__metaclass__ = type' plugins/ tests/); do
sed -e '/^__metaclass__ = type/d' -i $i;
done
* Remove super arguments, and stop inheriting from object.
* Adjust all __future__ imports:
for i in $(grep -REl "__future__.*absolute_import" plugins/ tests/); do
sed -e 's/from __future__ import .*/from __future__ import annotations/g' -i $i;
done
* Remove all UTF-8 encoding specifications for Python source files:
for i in $(grep -REl '[-][*]- coding: utf-8 -[*]-' plugins/ tests/); do
sed -e '/^# -\*- coding: utf-8 -\*-/d' -i $i;
done
* Reformat.
* 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.