Merge pull request #361 from simono/docker-add-user

Add option docker_user for docker module.
reviewable/pr18780/r1
Brian Coca 9 years ago
commit 5240124525

@ -160,6 +160,13 @@ options:
specified by docker-py. specified by docker-py.
default: docker-py default remote API version default: docker-py default remote API version
version_added: "1.8" version_added: "1.8"
docker_user:
description:
- Username or UID to use within the container
required: false
default:
aliases: []
version_added: "2.0"
username: username:
description: description:
- Remote API username. - Remote API username.
@ -1366,6 +1373,7 @@ class DockerManager(object):
'tty': self.module.params.get('tty'), 'tty': self.module.params.get('tty'),
'cpuset': self.module.params.get('cpu_set'), 'cpuset': self.module.params.get('cpu_set'),
'host_config': self.create_host_config(), 'host_config': self.create_host_config(),
'user': self.module.params.get('docker_user'),
} }
if self.ensure_capability('host_config', fail=False): if self.ensure_capability('host_config', fail=False):
@ -1576,6 +1584,7 @@ def main():
tls_ca_cert = dict(required=False, default=None, type='str'), tls_ca_cert = dict(required=False, default=None, type='str'),
tls_hostname = dict(required=False, type='str', default=None), tls_hostname = dict(required=False, type='str', default=None),
docker_api_version = dict(required=False, default=DEFAULT_DOCKER_API_VERSION, type='str'), docker_api_version = dict(required=False, default=DEFAULT_DOCKER_API_VERSION, type='str'),
docker_user = dict(default=None),
username = dict(default=None), username = dict(default=None),
password = dict(), password = dict(),
email = dict(), email = dict(),

Loading…
Cancel
Save