Skip to content

docker_swarm_service does not make force_update alone #353

Open
@IgorOhrimenko

Description

@IgorOhrimenko
SUMMARY

task:

    - name: docker service update --force serviceName
      community.docker.docker_swarm_service:
        force_update: yes
        name: serviceName

returned error:
state is present but all of the following are missing: image
but image is not required on the documentation page
I expect result as docker_swarm_service as like this:
docker service update --force serviceName
the command does not required image or any other parameters

ISSUE TYPE
  • Bug Report
COMPONENT NAME

docker_swarm_service_module

ANSIBLE VERSION
ansible [core 2.12.1]
  config file = /home/igor/ansible-playbooks/ansible.cfg
  configured module search path = ['/home/igor/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/igor/.local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/igor/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/igor/.local/bin/ansible
  python version = 3.9.9 (main, Dec 16 2021, 23:13:29) [GCC 11.2.0]
  jinja version = 3.0.3
  libyaml = True
COLLECTION VERSION
community.docker 2.5.1
CONFIGURATION
DEFAULT_GATHER_TIMEOUT(/home/igor/ansible-playbooks/ansible.cfg) = 20
DEFAULT_LOAD_CALLBACK_PLUGINS(/home/igor/ansible-playbooks/ansible.cfg) = True
DEFAULT_LOG_PATH(/home/igor/ansible-playbooks/ansible.cfg) = /tmp/ansible.log
DEFAULT_ROLES_PATH(/home/igor/ansible-playbooks/ansible.cfg) = ['/home/igor/ansible-playbooks/roles']
DEFAULT_STDOUT_CALLBACK(/home/igor/ansible-playbooks/ansible.cfg) = debug
DEFAULT_VAULT_PASSWORD_FILE(/home/igor/ansible-playbooks/ansible.cfg) = /home/igor/ansible-playbooks/vault_password_file
HOST_KEY_CHECKING(/home/igor/ansible-playbooks/ansible.cfg) = False
INTERPRETER_PYTHON(/home/igor/ansible-playbooks/ansible.cfg) = auto
OS / ENVIRONMENT

Ubuntu 22.04 LTS
Linux wsl 5.10.102.1-microsoft-standard-WSL2

STEPS TO REPRODUCE

Run task:

    - name: docker service update --force serviceName
      community.docker.docker_swarm_service:
        force_update: yes
        name: serviceName
EXPECTED RESULTS
serveName
overall progress: 1 out of 1 tasks
1/1: running   [==================================================>]
verify: Service converged
ACTUAL RESULTS

state is present but all of the following are missing: image


Metadata

Metadata

Assignees

No one assigned

    Labels

    docker-swarmDocker SwarmdocumentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions