mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add pid mode support to docker module
This allows setting the pid namespace for a container. Currently only the 'host' pid namespace is supported. This requires Docker 1.4.1 and docker-py 1.0.0
This commit is contained in:
parent
1c5601a0b5
commit
24f1cf80bd
1 changed files with 9 additions and 0 deletions
|
@ -201,6 +201,13 @@ options:
|
||||||
- or host. Requires docker >= 0.11.
|
- or host. Requires docker >= 0.11.
|
||||||
default: false
|
default: false
|
||||||
version_added: "1.8"
|
version_added: "1.8"
|
||||||
|
pid:
|
||||||
|
description:
|
||||||
|
- Set the PID namespace mode for the container (currently only supports 'host'). Requires docker-py >= 1.0.0 and docker >= 1.4.1.
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
aliases: []
|
||||||
|
version_added: "1.8"
|
||||||
registry:
|
registry:
|
||||||
description:
|
description:
|
||||||
- Remote registry URL to pull images from.
|
- Remote registry URL to pull images from.
|
||||||
|
@ -1149,6 +1156,7 @@ class DockerManager(object):
|
||||||
'privileged': self.module.params.get('privileged'),
|
'privileged': self.module.params.get('privileged'),
|
||||||
'links': self.links,
|
'links': self.links,
|
||||||
'network_mode': self.module.params.get('net'),
|
'network_mode': self.module.params.get('net'),
|
||||||
|
'pid_mode': self.module.params.get('pid'),
|
||||||
}
|
}
|
||||||
|
|
||||||
optionals = {}
|
optionals = {}
|
||||||
|
@ -1358,6 +1366,7 @@ def main():
|
||||||
lxc_conf = dict(default=None, type='list'),
|
lxc_conf = dict(default=None, type='list'),
|
||||||
name = dict(default=None),
|
name = dict(default=None),
|
||||||
net = dict(default=None),
|
net = dict(default=None),
|
||||||
|
pid = dict(default=None),
|
||||||
insecure_registry = dict(default=False, type='bool'),
|
insecure_registry = dict(default=False, type='bool'),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue