mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Add support from device_cgroup_rules parameter (#910)
This commit is contained in:
@@ -895,6 +895,11 @@ OPTION_DEVICE_REQUESTS = (
|
||||
))
|
||||
)
|
||||
|
||||
OPTION_DEVICE_CGROUP_RULES = (
|
||||
OptionGroup()
|
||||
.add_option('device_cgroup_rules', type='list', elements='str')
|
||||
)
|
||||
|
||||
OPTION_DNS_SERVERS = (
|
||||
OptionGroup()
|
||||
.add_option('dns_servers', type='list', elements='str')
|
||||
@@ -1194,6 +1199,7 @@ OPTIONS = [
|
||||
OPTION_DEVICE_READ_IOPS,
|
||||
OPTION_DEVICE_WRITE_IOPS,
|
||||
OPTION_DEVICE_REQUESTS,
|
||||
OPTION_DEVICE_CGROUP_RULES,
|
||||
OPTION_DNS_SERVERS,
|
||||
OPTION_DNS_OPTS,
|
||||
OPTION_DNS_SEARCH_DOMAINS,
|
||||
|
||||
@@ -44,6 +44,7 @@ from ansible_collections.community.docker.plugins.module_utils.module_container.
|
||||
OPTION_DEVICE_READ_IOPS,
|
||||
OPTION_DEVICE_WRITE_IOPS,
|
||||
OPTION_DEVICE_REQUESTS,
|
||||
OPTION_DEVICE_CGROUP_RULES,
|
||||
OPTION_DNS_SERVERS,
|
||||
OPTION_DNS_OPTS,
|
||||
OPTION_DNS_SEARCH_DOMAINS,
|
||||
@@ -1290,6 +1291,8 @@ OPTION_DEVICE_WRITE_IOPS.add_engine('docker_api', DockerAPIEngine.host_config_va
|
||||
OPTION_DEVICE_REQUESTS.add_engine('docker_api', DockerAPIEngine.host_config_value(
|
||||
'DeviceRequests', min_api_version='1.40', preprocess_value=_preprocess_device_requests))
|
||||
|
||||
OPTION_DEVICE_CGROUP_RULES.add_engine('docker_api', DockerAPIEngine.host_config_value('DeviceCgroupRules', min_api_version='1.28'))
|
||||
|
||||
OPTION_DNS_SERVERS.add_engine('docker_api', DockerAPIEngine.host_config_value('Dns'))
|
||||
|
||||
OPTION_DNS_OPTS.add_engine('docker_api', DockerAPIEngine.host_config_value('DnsOptions'))
|
||||
|
||||
@@ -299,6 +299,12 @@ options:
|
||||
- Driver-specific options.
|
||||
type: dict
|
||||
version_added: 0.1.0
|
||||
device_cgroup_rules:
|
||||
description:
|
||||
- List of cgroup rules to apply to the container.
|
||||
type: list
|
||||
elements: str
|
||||
version_added: 3.11.0
|
||||
dns_opts:
|
||||
description:
|
||||
- List of DNS options.
|
||||
|
||||
Reference in New Issue
Block a user