Documentation style changes

This commit is contained in:
Toshio Kuratomi 2015-03-06 21:51:51 -08:00
parent 47c6dae9f3
commit ca32205c7b

View file

@ -27,174 +27,175 @@ module: docker
version_added: "1.4" version_added: "1.4"
short_description: manage docker containers short_description: manage docker containers
description: description:
- Manage the life cycle of docker containers. - Manage the life cycle of docker containers.
options: options:
count: count:
description: description:
- Number of matching containers that should be in the desired state. - Number of matching containers that should be in the desired state.
default: 1 default: 1
image: image:
description: description:
- Container image used to match and launch containers. - Container image used to match and launch containers.
required: true required: true
pull: pull:
description: description:
- Control when container images are updated from the C(docker_url) registry. - 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 If "missing," images will be pulled only when missing from the host;
- '"always," the registry will be checked for a newer version of the image' if '"always," the registry will be checked for a newer version of the
- each time the task executes. image' each time the task executes.
default: missing default: missing
choices: [ "missing", "always" ] choices: [ "missing", "always" ]
version_added: "1.9" version_added: "1.9"
command: command:
description: description:
- Command used to match and launch containers. - Command used to match and launch containers.
default: null default: null
name: name:
description: description:
- Name used to match and uniquely name launched containers. Explicit names - Name used to match and uniquely name launched containers. Explicit names
- are used to uniquely identify a single container or to link among are used to uniquely identify a single container or to link among
- containers. Mutually exclusive with a "count" other than "1". containers. Mutually exclusive with a "count" other than "1".
default: null default: null
version_added: "1.5" version_added: "1.5"
ports: ports:
description: description:
- List containing private to public port mapping specification. Use docker - 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' - 'CLI-style syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000)'
- 8000 is a container port, 9000 is a host port, and 0.0.0.0 is a host - where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is
- interface. - a host interface.
default: null default: null
version_added: "1.5" version_added: "1.5"
expose: expose:
description: description:
- List of additional container ports to expose for port mappings or links. - 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 If the port is already exposed using EXPOSE in a Dockerfile, you don't
- need to expose it again. need to expose it again.
default: null default: null
version_added: "1.5" version_added: "1.5"
publish_all_ports: publish_all_ports:
description: description:
- Publish all exposed ports to the host interfaces. - Publish all exposed ports to the host interfaces.
default: false default: false
version_added: "1.5" version_added: "1.5"
volumes: volumes:
description: description:
- List of volumes to mount within the container using docker CLI-style - List of volumes to mount within the container using docker CLI-style
- 'syntax: C(/host:/container[:mode]) where "mode" may be "rw" or "ro".' - 'syntax: C(/host:/container[:mode]) where "mode" may be "rw" or "ro".'
default: null default: null
volumes_from: volumes_from:
description: description:
- List of names of containers to mount volumes from. - List of names of containers to mount volumes from.
default: null default: null
links: links:
description: description:
- List of other containers to link within this container with an optional - List of other containers to link within this container with an optional
- 'alias. Use docker CLI-style syntax: C(redis:myredis).' - 'alias. Use docker CLI-style syntax: C(redis:myredis).'
default: null default: null
version_added: "1.5" version_added: "1.5"
memory_limit: memory_limit:
description: description:
- RAM allocated to the container as a number of bytes or as a human-readable - 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.
default: 0 default: 0
docker_url: docker_url:
description: description:
- URL of the host running the docker daemon. This will default to the env - 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 default: ${DOCKER_HOST} or unix://var/run/docker.sock
docker_tls_cert: docker_tls_cert:
description: description:
- Path to a PEM-encoded client certificate to secure the Docker connection. - Path to a PEM-encoded client certificate to secure the Docker connection.
default: ${DOCKER_CERT_PATH}/cert.pem default: ${DOCKER_CERT_PATH}/cert.pem
docker_tls_key: docker_tls_key:
description: description:
- Path to a PEM-encoded client key to secure the Docker connection. - Path to a PEM-encoded client key to secure the Docker connection.
default: ${DOCKER_CERT_PATH}/key.pem default: ${DOCKER_CERT_PATH}/key.pem
docker_tls_cacert: docker_tls_cacert:
description: description:
- Path to a PEM-encoded certificate authority to secure the Docker connection. - Path to a PEM-encoded certificate authority to secure the Docker connection.
default: ${DOCKER_CERT_PATH}/ca.pem default: ${DOCKER_CERT_PATH}/ca.pem
docker_api_version: docker_api_version:
description: description:
- Remote API version to use. This defaults to the current default as - 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 default: docker-py default remote API version
version_added: "1.8" version_added: "1.8"
username: username:
description: description:
- Remote API username. - Remote API username.
default: null default: null
password: password:
description: description:
- Remote API password. - Remote API password.
default: null default: null
email: email:
description: description:
- Remote API email. - Remote API email.
default: null default: null
hostname: hostname:
description: description:
- Container hostname. - Container hostname.
default: null default: null
domainname: domainname:
description: description:
- Container domain name. - Container domain name.
default: null default: null
env: env:
description: description:
- Pass a dict of environment variables to the container. - Pass a dict of environment variables to the container.
default: null default: null
dns: dns:
description: description:
- List of custom DNS servers for the container. - List of custom DNS servers for the container.
required: false required: false
default: null default: null
detach: detach:
description: description:
- Enable detached mode to leave the container running in background. - Enable detached mode to leave the container running in background.
default: true default: true
state: state:
description: description:
- Assert the container's desired state. "present" only asserts that the - Assert the container's desired state. "present" only asserts that the
- matching containers exist. "started" asserts that the matching containers matching containers exist. "started" asserts that the matching
- both exist and are running, but takes no action if any configuration has containers both exist and are running, but takes no action if any
- changed. "reloaded" asserts that all matching containers are running and configuration has changed. "reloaded" asserts that all matching
- restarts any that have any images or configuration out of date. "restarted" containers are running and restarts any that have any images or
- unconditionally restarts (or starts) the matching containers. "stopped" and configuration out of date. "restarted" unconditionally restarts (or
- '"killed" stop and kill all matching containers. "absent" stops and then' starts) the matching containers. "stopped" and '"killed" stop and kill
- removes any matching containers. all matching containers. "absent" stops and then' removes any matching
containers.
required: false required: false
default: started default: started
choices: choices:
- present - present
- started - started
- reloaded - reloaded
- restarted - restarted
- stopped - stopped
- killed - killed
- absent - absent
privileged: privileged:
description: description:
- Whether the container should run in privileged mode or not. - Whether the container should run in privileged mode or not.
default: false default: false
lxc_conf: lxc_conf:
description: description:
- LXC configuration parameters, such as C(lxc.aa_profile:unconfined). - LXC configuration parameters, such as C(lxc.aa_profile:unconfined).
default: null default: null
stdin_open: stdin_open:
description: description:
- Keep stdin open after a container is launched. - Keep stdin open after a container is launched.
default: false default: false
version_added: "1.6" version_added: "1.6"
tty: tty:
description: description:
- Allocate a pseudo-tty within the container. - Allocate a pseudo-tty within the container.
default: false default: false
version_added: "1.6" version_added: "1.6"
net: net:
description: description:
- 'Network mode for the launched container: bridge, none, container:<name|id>' - 'Network mode for the launched container: bridge, none, container:<name|id>'
- 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: pid:
@ -206,26 +207,26 @@ options:
version_added: "1.9" version_added: "1.9"
registry: registry:
description: description:
- Remote registry URL to pull images from. - Remote registry URL to pull images from.
default: DockerHub default: DockerHub
aliases: [] aliases: []
version_added: "1.8" version_added: "1.8"
restart_policy: restart_policy:
description: description:
- Container restart policy. - Container restart policy.
choices: ["no", "on-failure", "always"] choices: ["no", "on-failure", "always"]
default: null default: null
version_added: "1.9" version_added: "1.9"
restart_policy_retry: restart_policy_retry:
description: description:
- Maximum number of times to restart a container. Leave as "0" for unlimited - Maximum number of times to restart a container. Leave as "0" for unlimited
- retries. retries.
default: 0 default: 0
version_added: "1.9" version_added: "1.9"
insecure_registry: insecure_registry:
description: description:
- Use insecure private registry by HTTP instead of HTTPS. Needed for - Use insecure private registry by HTTP instead of HTTPS. Needed for
- docker-py >= 0.5.0. docker-py >= 0.5.0.
default: false default: false
version_added: "1.9" version_added: "1.9"