Merge pull request #385 from dkerwin/docker_add_cpuset
docker: Add support for cpuset
This commit is contained in:
commit
289a7e40e3
1 changed files with 12 additions and 2 deletions
|
@ -273,6 +273,12 @@ options:
|
||||||
docker-py >= 0.5.0.
|
docker-py >= 0.5.0.
|
||||||
default: false
|
default: false
|
||||||
version_added: "1.9"
|
version_added: "1.9"
|
||||||
|
cpu_set:
|
||||||
|
description:
|
||||||
|
- CPUs in which to allow execution. Requires docker-py >= 0.6.0.
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
version_added: "1.9"
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Cove Schneider (@cove)"
|
- "Cove Schneider (@cove)"
|
||||||
|
@ -531,6 +537,7 @@ class DockerManager(object):
|
||||||
'pid': ((1, 0, 0), '1.17'),
|
'pid': ((1, 0, 0), '1.17'),
|
||||||
'log_driver': ((1, 2, 0), '1.18'),
|
'log_driver': ((1, 2, 0), '1.18'),
|
||||||
'host_config': ((0, 7, 0), '1.15'),
|
'host_config': ((0, 7, 0), '1.15'),
|
||||||
|
'cpu_set': ((0, 6, 0), '1.14'),
|
||||||
# Clientside only
|
# Clientside only
|
||||||
'insecure_registry': ((0, 5, 0), '0.0')
|
'insecure_registry': ((0, 5, 0), '0.0')
|
||||||
}
|
}
|
||||||
|
@ -1350,6 +1357,8 @@ class DockerManager(object):
|
||||||
'name': self.module.params.get('name'),
|
'name': self.module.params.get('name'),
|
||||||
'stdin_open': self.module.params.get('stdin_open'),
|
'stdin_open': self.module.params.get('stdin_open'),
|
||||||
'tty': self.module.params.get('tty'),
|
'tty': self.module.params.get('tty'),
|
||||||
|
'cpuset': self.module.params.get('cpu_set'),
|
||||||
|
'host_config': self.create_host_config(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.ensure_capability('host_config', fail=False):
|
if self.ensure_capability('host_config', fail=False):
|
||||||
|
@ -1583,6 +1592,7 @@ def main():
|
||||||
pid = dict(default=None),
|
pid = dict(default=None),
|
||||||
insecure_registry = dict(default=False, type='bool'),
|
insecure_registry = dict(default=False, type='bool'),
|
||||||
log_driver = dict(default=None, choices=['json-file', 'none', 'syslog']),
|
log_driver = dict(default=None, choices=['json-file', 'none', 'syslog']),
|
||||||
|
cpu_set = dict(default=None),
|
||||||
),
|
),
|
||||||
required_together = (
|
required_together = (
|
||||||
['tls_client_cert', 'tls_client_key'],
|
['tls_client_cert', 'tls_client_key'],
|
||||||
|
|
Loading…
Reference in a new issue