|
|
|
@ -27,7 +27,7 @@ module: docker
|
|
|
|
|
version_added: "1.4"
|
|
|
|
|
short_description: manage docker containers
|
|
|
|
|
description:
|
|
|
|
|
- Manage the life cycle of docker containers.
|
|
|
|
|
- Manage the life cycle of docker containers.
|
|
|
|
|
options:
|
|
|
|
|
count:
|
|
|
|
|
description:
|
|
|
|
@ -40,9 +40,9 @@ options:
|
|
|
|
|
pull:
|
|
|
|
|
description:
|
|
|
|
|
- Control when container images are updated from the C(docker_url) registry.
|
|
|
|
|
- If "missing," images will be pulled only when missing from the host; if
|
|
|
|
|
- '"always," the registry will be checked for a newer version of the image'
|
|
|
|
|
- each time the task executes.
|
|
|
|
|
If "missing," images will be pulled only when missing from the host;
|
|
|
|
|
if '"always," the registry will be checked for a newer version of the
|
|
|
|
|
image' each time the task executes.
|
|
|
|
|
default: missing
|
|
|
|
|
choices: [ "missing", "always" ]
|
|
|
|
|
version_added: "1.9"
|
|
|
|
@ -53,23 +53,23 @@ options:
|
|
|
|
|
name:
|
|
|
|
|
description:
|
|
|
|
|
- Name used to match and uniquely name launched containers. Explicit names
|
|
|
|
|
- are used to uniquely identify a single container or to link among
|
|
|
|
|
- containers. Mutually exclusive with a "count" other than "1".
|
|
|
|
|
are used to uniquely identify a single container or to link among
|
|
|
|
|
containers. Mutually exclusive with a "count" other than "1".
|
|
|
|
|
default: null
|
|
|
|
|
version_added: "1.5"
|
|
|
|
|
ports:
|
|
|
|
|
description:
|
|
|
|
|
- List containing private to public port mapping specification. Use docker
|
|
|
|
|
- 'CLI-style syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000) where'
|
|
|
|
|
- 8000 is a container port, 9000 is a host port, and 0.0.0.0 is a host
|
|
|
|
|
- interface.
|
|
|
|
|
- 'CLI-style syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000)'
|
|
|
|
|
- where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is
|
|
|
|
|
- a host interface.
|
|
|
|
|
default: null
|
|
|
|
|
version_added: "1.5"
|
|
|
|
|
expose:
|
|
|
|
|
description:
|
|
|
|
|
- List of additional container ports to expose for port mappings or links.
|
|
|
|
|
- If the port is already exposed using EXPOSE in a Dockerfile, you don't
|
|
|
|
|
- need to expose it again.
|
|
|
|
|
If the port is already exposed using EXPOSE in a Dockerfile, you don't
|
|
|
|
|
need to expose it again.
|
|
|
|
|
default: null
|
|
|
|
|
version_added: "1.5"
|
|
|
|
|
publish_all_ports:
|
|
|
|
@ -96,7 +96,7 @@ options:
|
|
|
|
|
memory_limit:
|
|
|
|
|
description:
|
|
|
|
|
- RAM allocated to the container as a number of bytes or as a human-readable
|
|
|
|
|
- string like "512MB". Leave as "0" to specify no limit.
|
|
|
|
|
string like "512MB". Leave as "0" to specify no limit.
|
|
|
|
|
required: false
|
|
|
|
|
default: null
|
|
|
|
|
aliases: []
|
|
|
|
@ -104,7 +104,7 @@ options:
|
|
|
|
|
docker_url:
|
|
|
|
|
description:
|
|
|
|
|
- URL of the host running the docker daemon. This will default to the env
|
|
|
|
|
- var DOCKER_HOST if unspecified.
|
|
|
|
|
var DOCKER_HOST if unspecified.
|
|
|
|
|
default: ${DOCKER_HOST} or unix://var/run/docker.sock
|
|
|
|
|
docker_tls_cert:
|
|
|
|
|
description:
|
|
|
|
@ -121,7 +121,7 @@ options:
|
|
|
|
|
docker_api_version:
|
|
|
|
|
description:
|
|
|
|
|
- Remote API version to use. This defaults to the current default as
|
|
|
|
|
- specified by docker-py.
|
|
|
|
|
specified by docker-py.
|
|
|
|
|
default: docker-py default remote API version
|
|
|
|
|
version_added: "1.8"
|
|
|
|
|
username:
|
|
|
|
@ -160,13 +160,14 @@ options:
|
|
|
|
|
state:
|
|
|
|
|
description:
|
|
|
|
|
- Assert the container's desired state. "present" only asserts that the
|
|
|
|
|
- matching containers exist. "started" asserts that the matching containers
|
|
|
|
|
- both exist and are running, but takes no action if any configuration has
|
|
|
|
|
- changed. "reloaded" asserts that all matching containers are running and
|
|
|
|
|
- restarts any that have any images or configuration out of date. "restarted"
|
|
|
|
|
- unconditionally restarts (or starts) the matching containers. "stopped" and
|
|
|
|
|
- '"killed" stop and kill all matching containers. "absent" stops and then'
|
|
|
|
|
- removes any matching containers.
|
|
|
|
|
matching containers exist. "started" asserts that the matching
|
|
|
|
|
containers both exist and are running, but takes no action if any
|
|
|
|
|
configuration has changed. "reloaded" asserts that all matching
|
|
|
|
|
containers are running and restarts any that have any images or
|
|
|
|
|
configuration out of date. "restarted" unconditionally restarts (or
|
|
|
|
|
starts) the matching containers. "stopped" and '"killed" stop and kill
|
|
|
|
|
all matching containers. "absent" stops and then' removes any matching
|
|
|
|
|
containers.
|
|
|
|
|
required: false
|
|
|
|
|
default: started
|
|
|
|
|
choices:
|
|
|
|
@ -223,13 +224,13 @@ options:
|
|
|
|
|
restart_policy_retry:
|
|
|
|
|
description:
|
|
|
|
|
- Maximum number of times to restart a container. Leave as "0" for unlimited
|
|
|
|
|
- retries.
|
|
|
|
|
retries.
|
|
|
|
|
default: 0
|
|
|
|
|
version_added: "1.9"
|
|
|
|
|
insecure_registry:
|
|
|
|
|
description:
|
|
|
|
|
- Use insecure private registry by HTTP instead of HTTPS. Needed for
|
|
|
|
|
- docker-py >= 0.5.0.
|
|
|
|
|
docker-py >= 0.5.0.
|
|
|
|
|
default: false
|
|
|
|
|
version_added: "1.9"
|
|
|
|
|
|
|
|
|
|