mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-12 03:05:01 +00:00
2950337e48
* 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 #1044 Fixes #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>