1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

docker_swarm_service: Remove root as default user (#51110)

* Remove root as default user

* Add changelog fragment

* Add deprecation documentation

* Tweak user default docs for docker_swarm_service

Co-Authored-By: hannseman <hannes@5monkeys.se>

* Tweak user default deprecation docs

Co-Authored-By: hannseman <hannes@5monkeys.se>
This commit is contained in:
Hannes Ljungberg 2019-01-27 17:26:41 +01:00 committed by John R Barker
parent ee39853426
commit b426daa064
3 changed files with 10 additions and 6 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "docker_swarm_service - Don't set ``root`` as the default user."

View file

@ -162,6 +162,8 @@ Noteworthy module changes
* The ``docker_service`` module was renamed to :ref:`docker_compose <docker_compose_module>`.
* The ``docker_swarm_service`` module no longer sets a default for the ``user`` option. Before, the default was ``root``.
Plugins
=======

View file

@ -320,12 +320,12 @@ options:
- Maps to docker service --update-order
- Requires API version >= 1.29
user:
type: str
required: false
default: root
description:
- username or UID.
- "If set to C(null) the image provided value (or the one already
set for the service) will be used"
- Sets the username or UID used for the specified command.
- Before Ansible 2.8, the default value for this option was C(root).
The default has been removed so that the user defined in the image is used if no user is specified here.
extends_documentation_fragment:
- docker
requirements:
@ -558,7 +558,7 @@ class DockerService(DockerBaseClass):
self.reserve_cpu = 0.000
self.reserve_memory = 0
self.mode = "replicated"
self.user = "root"
self.user = None
self.mounts = []
self.configs = []
self.secrets = []
@ -1300,7 +1300,7 @@ def main():
update_monitor=dict(default=5000000000, type='int'),
update_max_failure_ratio=dict(default=0, type='float'),
update_order=dict(default=None, type='str'),
user=dict(default='root'))
user=dict(type='str'))
option_minimal_versions = dict(
dns=dict(docker_py_version='2.6.0', docker_api_version='1.25'),