mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
parent
9f9e936d3c
commit
a24898b715
1 changed files with 16 additions and 0 deletions
|
@ -37,6 +37,10 @@ options:
|
||||||
capabilities:
|
capabilities:
|
||||||
description:
|
description:
|
||||||
- List of capabilities to add to the container.
|
- List of capabilities to add to the container.
|
||||||
|
cap_drop:
|
||||||
|
description:
|
||||||
|
- List of capabilities to drop from the container.
|
||||||
|
version_added: "2.7"
|
||||||
cleanup:
|
cleanup:
|
||||||
description:
|
description:
|
||||||
- Use with I(detach=false) to remove the container after successful execution.
|
- Use with I(detach=false) to remove the container after successful execution.
|
||||||
|
@ -561,6 +565,15 @@ EXAMPLES = '''
|
||||||
name: sleepy
|
name: sleepy
|
||||||
purge_networks: yes
|
purge_networks: yes
|
||||||
|
|
||||||
|
- name: Create a container with limited capabilities
|
||||||
|
docker_container:
|
||||||
|
name: sleepy
|
||||||
|
image: ubuntu:16.04
|
||||||
|
command: sleep infinity
|
||||||
|
capabilities:
|
||||||
|
- sys_time
|
||||||
|
cap_drop:
|
||||||
|
- all
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
@ -650,6 +663,7 @@ class TaskParameters(DockerBaseClass):
|
||||||
self.auto_remove = None
|
self.auto_remove = None
|
||||||
self.blkio_weight = None
|
self.blkio_weight = None
|
||||||
self.capabilities = None
|
self.capabilities = None
|
||||||
|
self.cap_drop = None
|
||||||
self.cleanup = None
|
self.cleanup = None
|
||||||
self.command = None
|
self.command = None
|
||||||
self.cpu_period = None
|
self.cpu_period = None
|
||||||
|
@ -905,6 +919,7 @@ class TaskParameters(DockerBaseClass):
|
||||||
network_mode='network_mode',
|
network_mode='network_mode',
|
||||||
userns_mode='userns_mode',
|
userns_mode='userns_mode',
|
||||||
cap_add='capabilities',
|
cap_add='capabilities',
|
||||||
|
cap_drop='cap_drop',
|
||||||
extra_hosts='etc_hosts',
|
extra_hosts='etc_hosts',
|
||||||
read_only='read_only',
|
read_only='read_only',
|
||||||
ipc_mode='ipc_mode',
|
ipc_mode='ipc_mode',
|
||||||
|
@ -2039,6 +2054,7 @@ def main():
|
||||||
auto_remove=dict(type='bool', default=False),
|
auto_remove=dict(type='bool', default=False),
|
||||||
blkio_weight=dict(type='int'),
|
blkio_weight=dict(type='int'),
|
||||||
capabilities=dict(type='list'),
|
capabilities=dict(type='list'),
|
||||||
|
cap_drop=dict(type='list'),
|
||||||
cleanup=dict(type='bool', default=False),
|
cleanup=dict(type='bool', default=False),
|
||||||
command=dict(type='raw'),
|
command=dict(type='raw'),
|
||||||
cpu_period=dict(type='int'),
|
cpu_period=dict(type='int'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue