|
|
@ -21,33 +21,6 @@ description:
|
|
|
|
- Manages docker services via a swarm manager node.
|
|
|
|
- Manages docker services via a swarm manager node.
|
|
|
|
version_added: "2.7"
|
|
|
|
version_added: "2.7"
|
|
|
|
options:
|
|
|
|
options:
|
|
|
|
name:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Service name.
|
|
|
|
|
|
|
|
- Corresponds to the C(--name) option of C(docker service create).
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
image:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Service image path and tag.
|
|
|
|
|
|
|
|
- Corresponds to the C(IMAGE) parameter of C(docker service create).
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
resolve_image:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- If the current image digest should be resolved from registry and updated if changed.
|
|
|
|
|
|
|
|
type: bool
|
|
|
|
|
|
|
|
default: yes
|
|
|
|
|
|
|
|
version_added: 2.8
|
|
|
|
|
|
|
|
state:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Service state.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
default: present
|
|
|
|
|
|
|
|
choices:
|
|
|
|
|
|
|
|
- present
|
|
|
|
|
|
|
|
- absent
|
|
|
|
|
|
|
|
args:
|
|
|
|
args:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- List arguments to be passed to the container.
|
|
|
|
- List arguments to be passed to the container.
|
|
|
@ -60,81 +33,54 @@ options:
|
|
|
|
- Corresponds to the C(COMMAND) parameter of C(docker service create).
|
|
|
|
- Corresponds to the C(COMMAND) parameter of C(docker service create).
|
|
|
|
type: raw
|
|
|
|
type: raw
|
|
|
|
version_added: 2.8
|
|
|
|
version_added: 2.8
|
|
|
|
placement:
|
|
|
|
configs:
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Configures service placement preferences and constraints.
|
|
|
|
|
|
|
|
suboptions:
|
|
|
|
|
|
|
|
constraints:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of the service constraints.
|
|
|
|
|
|
|
|
- Corresponds to the C(--constraint) option of C(docker service create).
|
|
|
|
|
|
|
|
type: list
|
|
|
|
|
|
|
|
preferences:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of the placement preferences as key value pairs.
|
|
|
|
|
|
|
|
- Corresponds to the C(--placement-pref) option of C(docker service create).
|
|
|
|
|
|
|
|
- Requires API version >= 1.27.
|
|
|
|
|
|
|
|
type: list
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
constraints:
|
|
|
|
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- List of the service constraints.
|
|
|
|
- List of dictionaries describing the service configs.
|
|
|
|
- Corresponds to the C(--constraint) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--config) option of C(docker service create).
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(placement.constraints) instead.
|
|
|
|
- Requires API version >= 1.30.
|
|
|
|
type: list
|
|
|
|
type: list
|
|
|
|
healthcheck:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Configure a check that is run to determine whether or not containers for this service are "healthy".
|
|
|
|
|
|
|
|
See the docs for the L(HEALTHCHECK Dockerfile instruction,https://docs.docker.com/engine/reference/builder/#healthcheck)
|
|
|
|
|
|
|
|
for details on how healthchecks work.
|
|
|
|
|
|
|
|
- "I(interval), I(timeout) and I(start_period) are specified as durations. They accept duration as a string in a format
|
|
|
|
|
|
|
|
that look like: C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
|
|
|
|
suboptions:
|
|
|
|
suboptions:
|
|
|
|
test:
|
|
|
|
config_id:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Command to run to check health.
|
|
|
|
- Config's ID.
|
|
|
|
- Must be either a string or a list. If it is a list, the first item must be one of C(NONE), C(CMD) or C(CMD-SHELL).
|
|
|
|
type: str
|
|
|
|
type: raw
|
|
|
|
required: yes
|
|
|
|
interval:
|
|
|
|
config_name:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Time between running the check.
|
|
|
|
- Config's name as defined at its creation.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
timeout:
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
filename:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Maximum time to allow one check to run.
|
|
|
|
- Name of the file containing the config. Defaults to the I(config_name) if not specified.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
retries:
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
uid:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Consecutive failures needed to report unhealthy. It accept integer value.
|
|
|
|
- UID of the config file's owner.
|
|
|
|
type: int
|
|
|
|
type: int
|
|
|
|
start_period:
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
gid:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Start period for the container to initialize before starting health-retries countdown.
|
|
|
|
- GID of the config file's group.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
mode:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- File access mode inside the container.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
version_added: "2.8"
|
|
|
|
default: "0o444"
|
|
|
|
hostname:
|
|
|
|
constraints:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Container hostname.
|
|
|
|
- List of the service constraints.
|
|
|
|
- Corresponds to the C(--hostname) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--constraint) option of C(docker service create).
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(placement.constraints) instead.
|
|
|
|
type: str
|
|
|
|
type: list
|
|
|
|
hosts:
|
|
|
|
container_labels:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Dict of host-to-IP mappings, where each host name is a key in the dictionary.
|
|
|
|
- Dictionary of key value pairs.
|
|
|
|
Each host name will be added to the container's /etc/hosts file.
|
|
|
|
- Corresponds to the C(--container-label) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--host) option of C(docker service create).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
type: dict
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
tty:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Allocate a pseudo-TTY.
|
|
|
|
|
|
|
|
- Corresponds to the C(--tty) option of C(docker service create).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: bool
|
|
|
|
|
|
|
|
dns:
|
|
|
|
dns:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- List of custom DNS servers.
|
|
|
|
- List of custom DNS servers.
|
|
|
@ -153,30 +99,6 @@ options:
|
|
|
|
- Corresponds to the C(--dns-option) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--dns-option) option of C(docker service create).
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
type: list
|
|
|
|
type: list
|
|
|
|
force_update:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Force update even if no changes require it.
|
|
|
|
|
|
|
|
- Corresponds to the C(--force) option of C(docker service update).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: bool
|
|
|
|
|
|
|
|
default: no
|
|
|
|
|
|
|
|
groups:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of additional group names and/or IDs that the container process will run as.
|
|
|
|
|
|
|
|
- Corresponds to the C(--group) option of C(docker service update).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: list
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
labels:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Dictionary of key value pairs.
|
|
|
|
|
|
|
|
- Corresponds to the C(--label) option of C(docker service create).
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
|
|
|
|
container_labels:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Dictionary of key value pairs.
|
|
|
|
|
|
|
|
- Corresponds to the C(--container-label) option of C(docker service create).
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
|
|
|
|
endpoint_mode:
|
|
|
|
endpoint_mode:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Service endpoint mode.
|
|
|
|
- Service endpoint mode.
|
|
|
@ -203,54 +125,77 @@ options:
|
|
|
|
- If variable also present in I(env), then I(env) value will override.
|
|
|
|
- If variable also present in I(env), then I(env) value will override.
|
|
|
|
type: list
|
|
|
|
type: list
|
|
|
|
version_added: "2.8"
|
|
|
|
version_added: "2.8"
|
|
|
|
logging:
|
|
|
|
force_update:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- "Logging configuration for the service."
|
|
|
|
- Force update even if no changes require it.
|
|
|
|
|
|
|
|
- Corresponds to the C(--force) option of C(docker service update).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: bool
|
|
|
|
|
|
|
|
default: no
|
|
|
|
|
|
|
|
groups:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of additional group names and/or IDs that the container process will run as.
|
|
|
|
|
|
|
|
- Corresponds to the C(--group) option of C(docker service update).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: list
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
healthcheck:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Configure a check that is run to determine whether or not containers for this service are "healthy".
|
|
|
|
|
|
|
|
See the docs for the L(HEALTHCHECK Dockerfile instruction,https://docs.docker.com/engine/reference/builder/#healthcheck)
|
|
|
|
|
|
|
|
for details on how healthchecks work.
|
|
|
|
|
|
|
|
- "I(interval), I(timeout) and I(start_period) are specified as durations. They accept duration as a string in a format
|
|
|
|
|
|
|
|
that look like: C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
suboptions:
|
|
|
|
suboptions:
|
|
|
|
driver:
|
|
|
|
test:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Configure the logging driver for a service.
|
|
|
|
- Command to run to check health.
|
|
|
|
- Corresponds to the C(--log-driver) option of C(docker service create).
|
|
|
|
- Must be either a string or a list. If it is a list, the first item must be one of C(NONE), C(CMD) or C(CMD-SHELL).
|
|
|
|
|
|
|
|
type: raw
|
|
|
|
|
|
|
|
interval:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Time between running the check.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
options:
|
|
|
|
timeout:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Options for service logging driver.
|
|
|
|
- Maximum time to allow one check to run.
|
|
|
|
- Corresponds to the C(--log-opt) option of C(docker service create).
|
|
|
|
type: str
|
|
|
|
type: dict
|
|
|
|
retries:
|
|
|
|
type: dict
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Consecutive failures needed to report unhealthy. It accept integer value.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
start_period:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Start period for the container to initialize before starting health-retries countdown.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
version_added: "2.8"
|
|
|
|
version_added: "2.8"
|
|
|
|
log_driver:
|
|
|
|
hostname:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Configure the logging driver for a service.
|
|
|
|
- Container hostname.
|
|
|
|
- Corresponds to the C(--log-driver) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--hostname) option of C(docker service create).
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(logging.driver) instead.
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
log_driver_options:
|
|
|
|
hosts:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Options for service logging driver.
|
|
|
|
- Dict of host-to-IP mappings, where each host name is a key in the dictionary.
|
|
|
|
- Corresponds to the C(--log-opt) option of C(docker service create).
|
|
|
|
Each host name will be added to the container's /etc/hosts file.
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(logging.options) instead.
|
|
|
|
- Corresponds to the C(--host) option of C(docker service create).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
type: dict
|
|
|
|
type: dict
|
|
|
|
reservations:
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
image:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Configures service resource reservations.
|
|
|
|
- Service image path and tag.
|
|
|
|
suboptions:
|
|
|
|
- Corresponds to the C(IMAGE) parameter of C(docker service create).
|
|
|
|
cpus:
|
|
|
|
type: str
|
|
|
|
description:
|
|
|
|
required: yes
|
|
|
|
- Service CPU reservation. C(0) equals no reservation.
|
|
|
|
labels:
|
|
|
|
- Corresponds to the C(--reserve-cpu) option of C(docker service create).
|
|
|
|
description:
|
|
|
|
type: float
|
|
|
|
- Dictionary of key value pairs.
|
|
|
|
memory:
|
|
|
|
- Corresponds to the C(--label) option of C(docker service create).
|
|
|
|
description:
|
|
|
|
|
|
|
|
- "Service memory reservation (format: C(<number>[<unit>])). Number is a positive integer.
|
|
|
|
|
|
|
|
Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
|
|
|
|
|
|
|
|
C(T) (tebibyte), or C(P) (pebibyte)."
|
|
|
|
|
|
|
|
- C(0) equals no reservation.
|
|
|
|
|
|
|
|
- Omitting the unit defaults to bytes.
|
|
|
|
|
|
|
|
- Corresponds to the C(--reserve-memory) option of C(docker service create).
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
type: dict
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
limits:
|
|
|
|
limits:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Configures service resource limits.
|
|
|
|
- Configures service resource limits.
|
|
|
@ -277,12 +222,6 @@ options:
|
|
|
|
- Corresponds to the C(--limit-cpu) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--limit-cpu) option of C(docker service create).
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(limits.cpus) instead.
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(limits.cpus) instead.
|
|
|
|
type: float
|
|
|
|
type: float
|
|
|
|
reserve_cpu:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Service CPU reservation. C(0) equals no reservation.
|
|
|
|
|
|
|
|
- Corresponds to the C(--reserve-cpu) option of C(docker service create).
|
|
|
|
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(reservations.cpus) instead.
|
|
|
|
|
|
|
|
type: float
|
|
|
|
|
|
|
|
limit_memory:
|
|
|
|
limit_memory:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- "Service memory limit (format: C(<number>[<unit>])). Number is a positive integer.
|
|
|
|
- "Service memory limit (format: C(<number>[<unit>])). Number is a positive integer.
|
|
|
@ -293,16 +232,34 @@ options:
|
|
|
|
- Corresponds to the C(--limit-memory) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--limit-memory) option of C(docker service create).
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(limits.memory) instead.
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(limits.memory) instead.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
reserve_memory:
|
|
|
|
logging:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- "Service memory reservation (format: C(<number>[<unit>])). Number is a positive integer.
|
|
|
|
- "Logging configuration for the service."
|
|
|
|
Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
|
|
|
|
suboptions:
|
|
|
|
C(T) (tebibyte), or C(P) (pebibyte)."
|
|
|
|
driver:
|
|
|
|
- C(0) equals no reservation.
|
|
|
|
description:
|
|
|
|
- Omitting the unit defaults to bytes.
|
|
|
|
- Configure the logging driver for a service.
|
|
|
|
- Corresponds to the C(--reserve-memory) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--log-driver) option of C(docker service create).
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(reservations.memory) instead.
|
|
|
|
type: str
|
|
|
|
|
|
|
|
options:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Options for service logging driver.
|
|
|
|
|
|
|
|
- Corresponds to the C(--log-opt) option of C(docker service create).
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
log_driver:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Configure the logging driver for a service.
|
|
|
|
|
|
|
|
- Corresponds to the C(--log-driver) option of C(docker service create).
|
|
|
|
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(logging.driver) instead.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
|
|
|
|
log_driver_options:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Options for service logging driver.
|
|
|
|
|
|
|
|
- Corresponds to the C(--log-opt) option of C(docker service create).
|
|
|
|
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(logging.options) instead.
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
mode:
|
|
|
|
mode:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Service replication mode.
|
|
|
|
- Service replication mode.
|
|
|
@ -311,8 +268,8 @@ options:
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
default: replicated
|
|
|
|
default: replicated
|
|
|
|
choices:
|
|
|
|
choices:
|
|
|
|
- replicated
|
|
|
|
- replicated
|
|
|
|
- global
|
|
|
|
- global
|
|
|
|
mounts:
|
|
|
|
mounts:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- List of dictionaries describing the service mounts.
|
|
|
|
- List of dictionaries describing the service mounts.
|
|
|
@ -343,79 +300,12 @@ options:
|
|
|
|
- Whether the mount should be read-only.
|
|
|
|
- Whether the mount should be read-only.
|
|
|
|
type: bool
|
|
|
|
type: bool
|
|
|
|
default: no
|
|
|
|
default: no
|
|
|
|
secrets:
|
|
|
|
name:
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of dictionaries describing the service secrets.
|
|
|
|
|
|
|
|
- Corresponds to the C(--secret) option of C(docker service create).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: list
|
|
|
|
|
|
|
|
suboptions:
|
|
|
|
|
|
|
|
secret_id:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Secret's ID.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
secret_name:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Secret's name as defined at its creation.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
filename:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Name of the file containing the secret. Defaults to the I(secret_name) if not specified.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
uid:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- UID of the secret file's owner.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
gid:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- GID of the secret file's group.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
mode:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- File access mode inside the container.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0o444
|
|
|
|
|
|
|
|
configs:
|
|
|
|
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- List of dictionaries describing the service configs.
|
|
|
|
- Service name.
|
|
|
|
- Corresponds to the C(--config) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--name) option of C(docker service create).
|
|
|
|
- Requires API version >= 1.30.
|
|
|
|
type: str
|
|
|
|
type: list
|
|
|
|
required: yes
|
|
|
|
suboptions:
|
|
|
|
|
|
|
|
config_id:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Config's ID.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
config_name:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Config's name as defined at its creation.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
filename:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Name of the file containing the config. Defaults to the I(config_name) if not specified.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
uid:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- UID of the config file's owner.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
gid:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- GID of the config file's group.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
mode:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- File access mode inside the container.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
default: "0o444"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
networks:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- List of the service networks names.
|
|
|
|
- List of the service networks names.
|
|
|
@ -423,19 +313,22 @@ options:
|
|
|
|
If changes are made the service will then be removed and recreated.
|
|
|
|
If changes are made the service will then be removed and recreated.
|
|
|
|
- Corresponds to the C(--network) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--network) option of C(docker service create).
|
|
|
|
type: list
|
|
|
|
type: list
|
|
|
|
stop_grace_period:
|
|
|
|
placement:
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Time to wait before force killing a container.
|
|
|
|
|
|
|
|
- "Accepts a duration as a string in a format that look like:
|
|
|
|
|
|
|
|
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
|
|
|
|
|
|
|
|
- Corresponds to the C(--stop-grace-period) option of C(docker service create).
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
stop_signal:
|
|
|
|
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Override default signal used to stop the container.
|
|
|
|
- Configures service placement preferences and constraints.
|
|
|
|
- Corresponds to the C(--stop-signal) option of C(docker service create).
|
|
|
|
suboptions:
|
|
|
|
type: str
|
|
|
|
constraints:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of the service constraints.
|
|
|
|
|
|
|
|
- Corresponds to the C(--constraint) option of C(docker service create).
|
|
|
|
|
|
|
|
type: list
|
|
|
|
|
|
|
|
preferences:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of the placement preferences as key value pairs.
|
|
|
|
|
|
|
|
- Corresponds to the C(--placement-pref) option of C(docker service create).
|
|
|
|
|
|
|
|
- Requires API version >= 1.27.
|
|
|
|
|
|
|
|
type: list
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
version_added: "2.8"
|
|
|
|
version_added: "2.8"
|
|
|
|
publish:
|
|
|
|
publish:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
@ -478,6 +371,48 @@ options:
|
|
|
|
- Corresponds to the C(--replicas) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--replicas) option of C(docker service create).
|
|
|
|
type: int
|
|
|
|
type: int
|
|
|
|
default: -1
|
|
|
|
default: -1
|
|
|
|
|
|
|
|
reservations:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Configures service resource reservations.
|
|
|
|
|
|
|
|
suboptions:
|
|
|
|
|
|
|
|
cpus:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Service CPU reservation. C(0) equals no reservation.
|
|
|
|
|
|
|
|
- Corresponds to the C(--reserve-cpu) option of C(docker service create).
|
|
|
|
|
|
|
|
type: float
|
|
|
|
|
|
|
|
memory:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- "Service memory reservation (format: C(<number>[<unit>])). Number is a positive integer.
|
|
|
|
|
|
|
|
Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
|
|
|
|
|
|
|
|
C(T) (tebibyte), or C(P) (pebibyte)."
|
|
|
|
|
|
|
|
- C(0) equals no reservation.
|
|
|
|
|
|
|
|
- Omitting the unit defaults to bytes.
|
|
|
|
|
|
|
|
- Corresponds to the C(--reserve-memory) option of C(docker service create).
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
reserve_cpu:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Service CPU reservation. C(0) equals no reservation.
|
|
|
|
|
|
|
|
- Corresponds to the C(--reserve-cpu) option of C(docker service create).
|
|
|
|
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(reservations.cpus) instead.
|
|
|
|
|
|
|
|
type: float
|
|
|
|
|
|
|
|
reserve_memory:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- "Service memory reservation (format: C(<number>[<unit>])). Number is a positive integer.
|
|
|
|
|
|
|
|
Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte),
|
|
|
|
|
|
|
|
C(T) (tebibyte), or C(P) (pebibyte)."
|
|
|
|
|
|
|
|
- C(0) equals no reservation.
|
|
|
|
|
|
|
|
- Omitting the unit defaults to bytes.
|
|
|
|
|
|
|
|
- Corresponds to the C(--reserve-memory) option of C(docker service create).
|
|
|
|
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(reservations.memory) instead.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
resolve_image:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- If the current image digest should be resolved from registry and updated if changed.
|
|
|
|
|
|
|
|
type: bool
|
|
|
|
|
|
|
|
default: yes
|
|
|
|
|
|
|
|
version_added: 2.8
|
|
|
|
restart_config:
|
|
|
|
restart_config:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Configures if and how to restart containers when they exit.
|
|
|
|
- Configures if and how to restart containers when they exit.
|
|
|
@ -544,6 +479,71 @@ options:
|
|
|
|
- Corresponds to the C(--restart-window) option of C(docker service create).
|
|
|
|
- Corresponds to the C(--restart-window) option of C(docker service create).
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.window) instead.
|
|
|
|
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.window) instead.
|
|
|
|
type: raw
|
|
|
|
type: raw
|
|
|
|
|
|
|
|
secrets:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of dictionaries describing the service secrets.
|
|
|
|
|
|
|
|
- Corresponds to the C(--secret) option of C(docker service create).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: list
|
|
|
|
|
|
|
|
suboptions:
|
|
|
|
|
|
|
|
secret_id:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Secret's ID.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
secret_name:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Secret's name as defined at its creation.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
filename:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Name of the file containing the secret. Defaults to the I(secret_name) if not specified.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
uid:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- UID of the secret file's owner.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
gid:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- GID of the secret file's group.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
mode:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- File access mode inside the container.
|
|
|
|
|
|
|
|
type: int
|
|
|
|
|
|
|
|
default: 0o444
|
|
|
|
|
|
|
|
state:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Service state.
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
required: yes
|
|
|
|
|
|
|
|
default: present
|
|
|
|
|
|
|
|
choices:
|
|
|
|
|
|
|
|
- present
|
|
|
|
|
|
|
|
- absent
|
|
|
|
|
|
|
|
stop_grace_period:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Time to wait before force killing a container.
|
|
|
|
|
|
|
|
- "Accepts a duration as a string in a format that look like:
|
|
|
|
|
|
|
|
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
|
|
|
|
|
|
|
|
- Corresponds to the C(--stop-grace-period) option of C(docker service create).
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
stop_signal:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Override default signal used to stop the container.
|
|
|
|
|
|
|
|
- Corresponds to the C(--stop-signal) option of C(docker service create).
|
|
|
|
|
|
|
|
type: str
|
|
|
|
|
|
|
|
version_added: "2.8"
|
|
|
|
|
|
|
|
tty:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Allocate a pseudo-TTY.
|
|
|
|
|
|
|
|
- Corresponds to the C(--tty) option of C(docker service create).
|
|
|
|
|
|
|
|
- Requires API version >= 1.25.
|
|
|
|
|
|
|
|
type: bool
|
|
|
|
update_config:
|
|
|
|
update_config:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Configures how the service should be updated. Useful for configuring rolling updates.
|
|
|
|
- Configures how the service should be updated. Useful for configuring rolling updates.
|
|
|
|