mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Changes command and entrypoint to type list
This commit is contained in:
parent
4cc872669c
commit
b15ceee6bd
1 changed files with 11 additions and 4 deletions
|
@ -574,7 +574,7 @@ EXAMPLES = '''
|
||||||
docker_container:
|
docker_container:
|
||||||
name: sleepy
|
name: sleepy
|
||||||
image: ubuntu:14.04
|
image: ubuntu:14.04
|
||||||
command: sleep infinity
|
command: ["sleep", "infinity"]
|
||||||
|
|
||||||
- name: Add container to networks
|
- name: Add container to networks
|
||||||
docker_container:
|
docker_container:
|
||||||
|
@ -801,6 +801,14 @@ class TaskParameters(DockerBaseClass):
|
||||||
if network.get('links'):
|
if network.get('links'):
|
||||||
network['links'] = self._parse_links(network['links'])
|
network['links'] = self._parse_links(network['links'])
|
||||||
|
|
||||||
|
if self.entrypoint:
|
||||||
|
# convert from list to str.
|
||||||
|
self.entrypoint = ' '.join([str(x) for x in self.entrypoint])
|
||||||
|
|
||||||
|
if self.command:
|
||||||
|
# convert from list to str
|
||||||
|
self.command = ' '.join([str(x) for x in self.command])
|
||||||
|
|
||||||
def fail(self, msg):
|
def fail(self, msg):
|
||||||
self.client.module.fail_json(msg=msg)
|
self.client.module.fail_json(msg=msg)
|
||||||
|
|
||||||
|
@ -1483,7 +1491,6 @@ class Container(DockerBaseClass):
|
||||||
return expected_devices
|
return expected_devices
|
||||||
|
|
||||||
def _get_expected_entrypoint(self):
|
def _get_expected_entrypoint(self):
|
||||||
self.log('_get_expected_entrypoint')
|
|
||||||
if not self.parameters.entrypoint:
|
if not self.parameters.entrypoint:
|
||||||
return None
|
return None
|
||||||
return shlex.split(self.parameters.entrypoint)
|
return shlex.split(self.parameters.entrypoint)
|
||||||
|
@ -1940,7 +1947,7 @@ def main():
|
||||||
blkio_weight=dict(type='int'),
|
blkio_weight=dict(type='int'),
|
||||||
capabilities=dict(type='list'),
|
capabilities=dict(type='list'),
|
||||||
cleanup=dict(type='bool', default=False),
|
cleanup=dict(type='bool', default=False),
|
||||||
command=dict(type='str'),
|
command=dict(type='list'),
|
||||||
cpu_period=dict(type='int'),
|
cpu_period=dict(type='int'),
|
||||||
cpu_quota=dict(type='int'),
|
cpu_quota=dict(type='int'),
|
||||||
cpuset_cpus=dict(type='str'),
|
cpuset_cpus=dict(type='str'),
|
||||||
|
@ -1953,7 +1960,7 @@ def main():
|
||||||
dns_search_domains=dict(type='list'),
|
dns_search_domains=dict(type='list'),
|
||||||
env=dict(type='dict'),
|
env=dict(type='dict'),
|
||||||
env_file=dict(type='path'),
|
env_file=dict(type='path'),
|
||||||
entrypoint=dict(type='str'),
|
entrypoint=dict(type='list'),
|
||||||
etc_hosts=dict(type='dict'),
|
etc_hosts=dict(type='dict'),
|
||||||
exposed_ports=dict(type='list', aliases=['exposed', 'expose']),
|
exposed_ports=dict(type='list', aliases=['exposed', 'expose']),
|
||||||
force_kill=dict(type='bool', default=False, aliases=['forcekill']),
|
force_kill=dict(type='bool', default=False, aliases=['forcekill']),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue