mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
docker_swarm_service: ensure idempotency when the user parameter is None (#49235)
* ensure idempotency for user set to None * Update `user` documentation and add changelog fragment * clarify changelog fragments and parameters documentation * use restructuredtext syntax in changelog fragment
This commit is contained in:
parent
b89eb7a8c9
commit
b183eb4464
2 changed files with 10 additions and 2 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
bugfixes:
|
||||
- 'docker_swarm_service: fails because of default "user: root" (https://github.com/ansible/ansible/issues/49199)'
|
||||
minor_changes:
|
||||
- 'docker_swarm_service: use docker defaults for the ``user`` parameter if it is set to ``null``'
|
|
@ -271,7 +271,10 @@ options:
|
|||
user:
|
||||
required: false
|
||||
default: root
|
||||
description: username or UID
|
||||
description:
|
||||
- username or UID.
|
||||
- "If set to C(null) the image provided value (or the one already
|
||||
set for the service) will be used"
|
||||
extends_documentation_fragment:
|
||||
- docker
|
||||
requirements:
|
||||
|
@ -720,7 +723,7 @@ class DockerService(DockerBaseClass):
|
|||
differences.add('update_order', parameter=self.update_order, active=os.update_order)
|
||||
if self.image != os.image.split('@')[0]:
|
||||
differences.add('image', parameter=self.image, active=os.image.split('@')[0])
|
||||
if self.user != os.user:
|
||||
if self.user and self.user != os.user:
|
||||
differences.add('user', parameter=self.user, active=os.user)
|
||||
if self.dns != os.dns:
|
||||
differences.add('dns', parameter=self.dns, active=os.dns)
|
||||
|
|
Loading…
Reference in a new issue