From c6b3f2c848c0236a8f7bc1096d424d27635d62e3 Mon Sep 17 00:00:00 2001 From: Chanwit Kaewkasi Date: Tue, 29 Jan 2019 03:38:02 +0700 Subject: [PATCH] change the default value of user to null (#51376) Change the default value of user from root to null to conform the current Docker behavior and the current Ansible documentation. --- lib/ansible/modules/cloud/docker/docker_swarm_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/docker/docker_swarm_service.py b/lib/ansible/modules/cloud/docker/docker_swarm_service.py index 2889d8373c2..56f544fcbff 100644 --- a/lib/ansible/modules/cloud/docker/docker_swarm_service.py +++ b/lib/ansible/modules/cloud/docker/docker_swarm_service.py @@ -1047,7 +1047,7 @@ class DockerServiceManager(): update_config_data = raw_data['Spec']['UpdateConfig'] ds.image = task_template_data['ContainerSpec']['Image'] - ds.user = task_template_data['ContainerSpec'].get('User', 'root') + ds.user = task_template_data['ContainerSpec'].get('User', None) ds.env = task_template_data['ContainerSpec'].get('Env', []) ds.command = task_template_data['ContainerSpec'].get('Command') ds.args = task_template_data['ContainerSpec'].get('Args', [])