Skip to content

Add --with-registry-auth flag support to docker_swarm_service #1177

@elgntt

Description

@elgntt
SUMMARY

The community.docker.docker_swarm_service module currently does not provide an option equivalent to the --with-registry-auth flag available in the docker service create and docker service update CLI commands.

This flag is essential for Swarm environments pulling images from private registries. Without it, worker nodes fail to pull private images unless credentials are manually distributed or pre-logged in on every node, which defeats the purpose of declarative service deployment.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

community.docker.docker_swarm_service

ADDITIONAL INFORMATION

Adding a boolean option like with_registry_auth: true would align the module’s capabilities with Docker CLI and community.docker.docker_stack, which already supports this parameter internally.

Example expected usage:

- name: Deploy a service with registry credentials
  community.docker.docker_swarm_service:
    name: my_service
    image: registry.gitlab.com/proj/myimage:latest
    state: present
    with_registry_auth: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions