mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-18 12:52:37 +00:00
(cherry picked from commit be58ccc13f)
This commit is contained in:
parent
81273a93f2
commit
b29e91f866
@ -77,17 +77,17 @@ options:
|
|||||||
tls:
|
tls:
|
||||||
description:
|
description:
|
||||||
- Secure the connection to the API by using TLS without verifying the authenticity of the Docker host
|
- Secure the connection to the API by using TLS without verifying the authenticity of the Docker host
|
||||||
server. Note that if I(validate_certs) is set to C(yes) as well, it will take precedence.
|
server. Note that if I(validate_certs) is set to C(true) as well, it will take precedence.
|
||||||
- If the value is not specified in the task, the value of environment variable C(DOCKER_TLS) will be used
|
- If the value is not specified in the task, the value of environment variable C(DOCKER_TLS) will be used
|
||||||
instead. If the environment variable is not set, the default value will be used.
|
instead. If the environment variable is not set, the default value will be used.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
use_ssh_client:
|
use_ssh_client:
|
||||||
description:
|
description:
|
||||||
- For SSH transports, use the C(ssh) CLI tool instead of paramiko.
|
- For SSH transports, use the C(ssh) CLI tool instead of paramiko.
|
||||||
- Requires Docker SDK for Python 4.4.0 or newer.
|
- Requires Docker SDK for Python 4.4.0 or newer.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
version_added: 1.5.0
|
version_added: 1.5.0
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
@ -95,13 +95,13 @@ options:
|
|||||||
- If the value is not specified in the task, the value of environment variable C(DOCKER_TLS_VERIFY) will be
|
- If the value is not specified in the task, the value of environment variable C(DOCKER_TLS_VERIFY) will be
|
||||||
used instead. If the environment variable is not set, the default value will be used.
|
used instead. If the environment variable is not set, the default value will be used.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
aliases: [ tls_verify ]
|
aliases: [ tls_verify ]
|
||||||
debug:
|
debug:
|
||||||
description:
|
description:
|
||||||
- Debug mode
|
- Debug mode
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
|
|
||||||
notes:
|
notes:
|
||||||
- Connect to the Docker daemon by providing parameters with each task or by defining environment variables.
|
- Connect to the Docker daemon by providing parameters with each task or by defining environment variables.
|
||||||
|
|||||||
@ -22,7 +22,7 @@ DOCUMENTATION = '''
|
|||||||
options:
|
options:
|
||||||
plugin:
|
plugin:
|
||||||
description: token that ensures this is a source file for the C(docker_machine) plugin.
|
description: token that ensures this is a source file for the C(docker_machine) plugin.
|
||||||
required: yes
|
required: true
|
||||||
choices: ['docker_machine', 'community.docker.docker_machine']
|
choices: ['docker_machine', 'community.docker.docker_machine']
|
||||||
daemon_env:
|
daemon_env:
|
||||||
description:
|
description:
|
||||||
@ -45,13 +45,13 @@ DOCUMENTATION = '''
|
|||||||
description:
|
description:
|
||||||
- When C(true), hosts which Docker Machine indicates are in a state other than C(running) will be skipped.
|
- When C(true), hosts which Docker Machine indicates are in a state other than C(running) will be skipped.
|
||||||
type: bool
|
type: bool
|
||||||
default: yes
|
default: true
|
||||||
verbose_output:
|
verbose_output:
|
||||||
description:
|
description:
|
||||||
- When C(true), include all available nodes metadata (for exmaple C(Image), C(Region), C(Size)) as a JSON object
|
- When C(true), include all available nodes metadata (for exmaple C(Image), C(Region), C(Size)) as a JSON object
|
||||||
named C(docker_machine_node_attributes).
|
named C(docker_machine_node_attributes).
|
||||||
type: bool
|
type: bool
|
||||||
default: yes
|
default: true
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
@ -70,13 +70,13 @@ plugin: community.docker.docker_machine
|
|||||||
# ]
|
# ]
|
||||||
# ...
|
# ...
|
||||||
# }
|
# }
|
||||||
strict: no
|
strict: false
|
||||||
keyed_groups:
|
keyed_groups:
|
||||||
- separator: ''
|
- separator: ''
|
||||||
key: docker_machine_node_attributes.DriverName
|
key: docker_machine_node_attributes.DriverName
|
||||||
|
|
||||||
# Example grouping hosts by Digital Machine tag
|
# Example grouping hosts by Digital Machine tag
|
||||||
strict: no
|
strict: false
|
||||||
keyed_groups:
|
keyed_groups:
|
||||||
- prefix: tag
|
- prefix: tag
|
||||||
key: 'dm_tags'
|
key: 'dm_tags'
|
||||||
|
|||||||
@ -41,16 +41,16 @@ DOCUMENTATION = '''
|
|||||||
description: Toggle to (not) include all available nodes metadata (for example C(Platform), C(Architecture), C(OS),
|
description: Toggle to (not) include all available nodes metadata (for example C(Platform), C(Architecture), C(OS),
|
||||||
C(EngineVersion))
|
C(EngineVersion))
|
||||||
type: bool
|
type: bool
|
||||||
default: yes
|
default: true
|
||||||
tls:
|
tls:
|
||||||
description: Connect using TLS without verifying the authenticity of the Docker host server.
|
description: Connect using TLS without verifying the authenticity of the Docker host server.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description: Toggle if connecting using TLS with or without verifying the authenticity of the Docker
|
description: Toggle if connecting using TLS with or without verifying the authenticity of the Docker
|
||||||
host server.
|
host server.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
aliases: [ tls_verify ]
|
aliases: [ tls_verify ]
|
||||||
client_key:
|
client_key:
|
||||||
description: Path to the client's TLS key file.
|
description: Path to the client's TLS key file.
|
||||||
@ -91,7 +91,7 @@ DOCUMENTATION = '''
|
|||||||
- For SSH transports, use the C(ssh) CLI tool instead of paramiko.
|
- For SSH transports, use the C(ssh) CLI tool instead of paramiko.
|
||||||
- Requires Docker SDK for Python 4.4.0 or newer.
|
- Requires Docker SDK for Python 4.4.0 or newer.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
version_added: 1.5.0
|
version_added: 1.5.0
|
||||||
include_host_uri:
|
include_host_uri:
|
||||||
description: Toggle to return the additional attribute C(ansible_host_uri) which contains the URI of the
|
description: Toggle to return the additional attribute C(ansible_host_uri) which contains the URI of the
|
||||||
@ -99,7 +99,7 @@ DOCUMENTATION = '''
|
|||||||
modification as value of option I(docker_host) in Docker Swarm modules when connecting via API.
|
modification as value of option I(docker_host) in Docker Swarm modules when connecting via API.
|
||||||
The port always defaults to C(2376).
|
The port always defaults to C(2376).
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
include_host_uri_port:
|
include_host_uri_port:
|
||||||
description: Override the detected port number included in I(ansible_host_uri)
|
description: Override the detected port number included in I(ansible_host_uri)
|
||||||
type: int
|
type: int
|
||||||
@ -117,12 +117,12 @@ docker_host: tcp://my-docker-host:2375
|
|||||||
# Example using remote docker with unverified TLS
|
# Example using remote docker with unverified TLS
|
||||||
plugin: community.docker.docker_swarm
|
plugin: community.docker.docker_swarm
|
||||||
docker_host: tcp://my-docker-host:2376
|
docker_host: tcp://my-docker-host:2376
|
||||||
tls: yes
|
tls: true
|
||||||
|
|
||||||
# Example using remote docker with verified TLS and client certificate verification
|
# Example using remote docker with verified TLS and client certificate verification
|
||||||
plugin: community.docker.docker_swarm
|
plugin: community.docker.docker_swarm
|
||||||
docker_host: tcp://my-docker-host:2376
|
docker_host: tcp://my-docker-host:2376
|
||||||
validate_certs: yes
|
validate_certs: true
|
||||||
ca_cert: /somewhere/ca.pem
|
ca_cert: /somewhere/ca.pem
|
||||||
client_key: /somewhere/key.pem
|
client_key: /somewhere/key.pem
|
||||||
client_cert: /somewhere/cert.pem
|
client_cert: /somewhere/cert.pem
|
||||||
|
|||||||
@ -86,7 +86,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- When I(state) is C(present) specify whether or not to include linked services.
|
- When I(state) is C(present) specify whether or not to include linked services.
|
||||||
type: bool
|
type: bool
|
||||||
default: yes
|
default: true
|
||||||
definition:
|
definition:
|
||||||
description:
|
description:
|
||||||
- Compose file describing one or more services, networks and volumes.
|
- Compose file describing one or more services, networks and volumes.
|
||||||
@ -96,7 +96,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether or not to check the Docker daemon's hostname against the name provided in the client certificate.
|
- Whether or not to check the Docker daemon's hostname against the name provided in the client certificate.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
recreate:
|
recreate:
|
||||||
description:
|
description:
|
||||||
- By default containers will be recreated when their configuration differs from the service definition.
|
- By default containers will be recreated when their configuration differs from the service definition.
|
||||||
@ -116,19 +116,19 @@ options:
|
|||||||
- Use the I(nocache) option to ignore the image cache when performing the build.
|
- Use the I(nocache) option to ignore the image cache when performing the build.
|
||||||
- If an existing image is replaced, services using the image will be recreated unless I(recreate) is C(never).
|
- If an existing image is replaced, services using the image will be recreated unless I(recreate) is C(never).
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
pull:
|
pull:
|
||||||
description:
|
description:
|
||||||
- Use with I(state) C(present) to always pull images prior to starting the application.
|
- Use with I(state) C(present) to always pull images prior to starting the application.
|
||||||
- Same as running C(docker-compose pull).
|
- Same as running C(docker-compose pull).
|
||||||
- When a new image is pulled, services using the image will be recreated unless I(recreate) is C(never).
|
- When a new image is pulled, services using the image will be recreated unless I(recreate) is C(never).
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
nocache:
|
nocache:
|
||||||
description:
|
description:
|
||||||
- Use with the I(build) option to ignore the cache during the image build process.
|
- Use with the I(build) option to ignore the cache during the image build process.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
remove_images:
|
remove_images:
|
||||||
description:
|
description:
|
||||||
- Use with I(state) C(absent) to remove all images or only local images.
|
- Use with I(state) C(absent) to remove all images or only local images.
|
||||||
@ -140,7 +140,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Use with I(state) C(absent) to remove data volumes.
|
- Use with I(state) C(absent) to remove data volumes.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
stopped:
|
stopped:
|
||||||
description:
|
description:
|
||||||
- Use with I(state) C(present) to stop all containers defined in the Compose file.
|
- Use with I(state) C(present) to stop all containers defined in the Compose file.
|
||||||
@ -148,18 +148,18 @@ options:
|
|||||||
- Requires C(docker-compose) version 1.17.0 or greater for full support. For older versions, the services will
|
- Requires C(docker-compose) version 1.17.0 or greater for full support. For older versions, the services will
|
||||||
first be started and then stopped when the service is supposed to be created as stopped.
|
first be started and then stopped when the service is supposed to be created as stopped.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
restarted:
|
restarted:
|
||||||
description:
|
description:
|
||||||
- Use with I(state) C(present) to restart all containers defined in the Compose file.
|
- Use with I(state) C(present) to restart all containers defined in the Compose file.
|
||||||
- If I(services) is defined, only the containers listed there will be restarted.
|
- If I(services) is defined, only the containers listed there will be restarted.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
remove_orphans:
|
remove_orphans:
|
||||||
description:
|
description:
|
||||||
- Remove containers for services not defined in the Compose file.
|
- Remove containers for services not defined in the Compose file.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
timeout:
|
timeout:
|
||||||
description:
|
description:
|
||||||
- Timeout in seconds for container shutdown when attached or when containers are already running.
|
- Timeout in seconds for container shutdown when attached or when containers are already running.
|
||||||
@ -189,7 +189,7 @@ EXAMPLES = '''
|
|||||||
|
|
||||||
- name: Run using a project directory
|
- name: Run using a project directory
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
gather_facts: no
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Tear down existing services
|
- name: Tear down existing services
|
||||||
community.docker.docker_compose:
|
community.docker.docker_compose:
|
||||||
@ -207,7 +207,7 @@ EXAMPLES = '''
|
|||||||
- name: Run `docker-compose up` again
|
- name: Run `docker-compose up` again
|
||||||
community.docker.docker_compose:
|
community.docker.docker_compose:
|
||||||
project_src: flask
|
project_src: flask
|
||||||
build: no
|
build: false
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
- ansible.builtin.debug:
|
||||||
@ -219,8 +219,8 @@ EXAMPLES = '''
|
|||||||
- name: Stop all services
|
- name: Stop all services
|
||||||
community.docker.docker_compose:
|
community.docker.docker_compose:
|
||||||
project_src: flask
|
project_src: flask
|
||||||
build: no
|
build: false
|
||||||
stopped: yes
|
stopped: true
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
- ansible.builtin.debug:
|
||||||
@ -234,8 +234,8 @@ EXAMPLES = '''
|
|||||||
- name: Restart services
|
- name: Restart services
|
||||||
community.docker.docker_compose:
|
community.docker.docker_compose:
|
||||||
project_src: flask
|
project_src: flask
|
||||||
build: no
|
build: false
|
||||||
restarted: yes
|
restarted: true
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
- ansible.builtin.debug:
|
||||||
@ -248,7 +248,7 @@ EXAMPLES = '''
|
|||||||
|
|
||||||
- name: Scale the web service to 2
|
- name: Scale the web service to 2
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
gather_facts: no
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- community.docker.docker_compose:
|
- community.docker.docker_compose:
|
||||||
project_src: flask
|
project_src: flask
|
||||||
@ -261,7 +261,7 @@ EXAMPLES = '''
|
|||||||
|
|
||||||
- name: Run with inline v2 compose
|
- name: Run with inline v2 compose
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
gather_facts: no
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- community.docker.docker_compose:
|
- community.docker.docker_compose:
|
||||||
project_src: flask
|
project_src: flask
|
||||||
@ -295,7 +295,7 @@ EXAMPLES = '''
|
|||||||
|
|
||||||
- name: Run with inline v1 compose
|
- name: Run with inline v1 compose
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
gather_facts: no
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- community.docker.docker_compose:
|
- community.docker.docker_compose:
|
||||||
project_src: flask
|
project_src: flask
|
||||||
@ -415,7 +415,7 @@ services:
|
|||||||
|
|
||||||
actions:
|
actions:
|
||||||
description: Provides the actions to be taken on each service as determined by compose.
|
description: Provides the actions to be taken on each service as determined by compose.
|
||||||
returned: when in check mode or I(debug) is C(yes)
|
returned: when in check mode or I(debug) is C(true)
|
||||||
type: complex
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
service_name:
|
service_name:
|
||||||
|
|||||||
@ -33,7 +33,7 @@ options:
|
|||||||
- To use binary I(data), it is better to keep it Base64 encoded and let it
|
- To use binary I(data), it is better to keep it Base64 encoded and let it
|
||||||
be decoded by this option.
|
be decoded by this option.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
data_src:
|
data_src:
|
||||||
description:
|
description:
|
||||||
- The file on the target from which to read the config.
|
- The file on the target from which to read the config.
|
||||||
@ -50,7 +50,7 @@ options:
|
|||||||
- Use with state C(present) to always remove and recreate an existing config.
|
- Use with state C(present) to always remove and recreate an existing config.
|
||||||
- If C(true), an existing config will be replaced, even if it has not been changed.
|
- If C(true), an existing config will be replaced, even if it has not been changed.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
rolling_versions:
|
rolling_versions:
|
||||||
description:
|
description:
|
||||||
- If set to C(true), configs are created with an increasing version number appended to their name.
|
- If set to C(true), configs are created with an increasing version number appended to their name.
|
||||||
@ -70,7 +70,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- The name of the config.
|
- The name of the config.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Set to C(present), if the config should exist, and C(absent), if it should not.
|
- Set to C(present), if the config should exist, and C(absent), if it should not.
|
||||||
@ -162,7 +162,7 @@ EXAMPLES = '''
|
|||||||
community.docker.docker_config:
|
community.docker.docker_config:
|
||||||
name: foo
|
name: foo
|
||||||
data: Goodnight everyone!
|
data: Goodnight everyone!
|
||||||
force: yes
|
force: true
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Remove config foo
|
- name: Remove config foo
|
||||||
|
|||||||
@ -25,7 +25,7 @@ options:
|
|||||||
- The name of the container to inspect.
|
- The name of the container to inspect.
|
||||||
- When identifying an existing container name may be a name or a long or short container ID.
|
- When identifying an existing container name may be a name or a long or short container ID.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.docker.docker
|
- community.docker.docker
|
||||||
- community.docker.docker.docker_py_1_documentation
|
- community.docker.docker.docker_py_1_documentation
|
||||||
|
|||||||
@ -28,7 +28,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to list containers.
|
- Whether to list containers.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
containers_filters:
|
containers_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting containers to list.
|
- A dictionary of filter values used for selecting containers to list.
|
||||||
@ -42,7 +42,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to list images.
|
- Whether to list images.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
images_filters:
|
images_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting images to list.
|
- A dictionary of filter values used for selecting images to list.
|
||||||
@ -56,7 +56,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to list networks.
|
- Whether to list networks.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
networks_filters:
|
networks_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting networks to list.
|
- A dictionary of filter values used for selecting networks to list.
|
||||||
@ -69,7 +69,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to list volumes.
|
- Whether to list volumes.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
volumes_filters:
|
volumes_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting volumes to list.
|
- A dictionary of filter values used for selecting volumes to list.
|
||||||
@ -83,16 +83,16 @@ options:
|
|||||||
- Summary information on used disk space by all Docker layers.
|
- Summary information on used disk space by all Docker layers.
|
||||||
- The output is a sum of images, volumes, containers and build cache.
|
- The output is a sum of images, volumes, containers and build cache.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
verbose_output:
|
verbose_output:
|
||||||
description:
|
description:
|
||||||
- When set to C(yes) and I(networks), I(volumes), I(images), I(containers) or I(disk_usage) is set to C(yes)
|
- When set to C(true) and I(networks), I(volumes), I(images), I(containers) or I(disk_usage) is set to C(true)
|
||||||
then output will contain verbose information about objects matching the full output of API method.
|
then output will contain verbose information about objects matching the full output of API method.
|
||||||
For details see the documentation of your version of Docker API at U(https://docs.docker.com/engine/api/).
|
For details see the documentation of your version of Docker API at U(https://docs.docker.com/engine/api/).
|
||||||
- The verbose output in this module contains only subset of information returned by I(_info) module
|
- The verbose output in this module contains only subset of information returned by I(_info) module
|
||||||
for each type of the objects.
|
for each type of the objects.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.docker.docker
|
- community.docker.docker
|
||||||
- community.docker.docker.docker_py_1_documentation
|
- community.docker.docker.docker_py_1_documentation
|
||||||
@ -113,30 +113,30 @@ EXAMPLES = '''
|
|||||||
|
|
||||||
- name: Get info on docker host and list images
|
- name: Get info on docker host and list images
|
||||||
community.docker.docker_host_info:
|
community.docker.docker_host_info:
|
||||||
images: yes
|
images: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Get info on docker host and list images matching the filter
|
- name: Get info on docker host and list images matching the filter
|
||||||
community.docker.docker_host_info:
|
community.docker.docker_host_info:
|
||||||
images: yes
|
images: true
|
||||||
images_filters:
|
images_filters:
|
||||||
label: "mylabel"
|
label: "mylabel"
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Get info on docker host and verbose list images
|
- name: Get info on docker host and verbose list images
|
||||||
community.docker.docker_host_info:
|
community.docker.docker_host_info:
|
||||||
images: yes
|
images: true
|
||||||
verbose_output: yes
|
verbose_output: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Get info on docker host and used disk space
|
- name: Get info on docker host and used disk space
|
||||||
community.docker.docker_host_info:
|
community.docker.docker_host_info:
|
||||||
disk_usage: yes
|
disk_usage: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Get info on docker host and list containers matching the filter
|
- name: Get info on docker host and list containers matching the filter
|
||||||
community.docker.docker_host_info:
|
community.docker.docker_host_info:
|
||||||
containers: yes
|
containers: true
|
||||||
containers_filters:
|
containers_filters:
|
||||||
label:
|
label:
|
||||||
- key1=value1
|
- key1=value1
|
||||||
@ -163,40 +163,40 @@ host_info:
|
|||||||
volumes:
|
volumes:
|
||||||
description:
|
description:
|
||||||
- List of dict objects containing the basic information about each volume.
|
- List of dict objects containing the basic information about each volume.
|
||||||
Keys matches the C(docker volume ls) output unless I(verbose_output=yes).
|
Keys matches the C(docker volume ls) output unless I(verbose_output=true).
|
||||||
See description for I(verbose_output).
|
See description for I(verbose_output).
|
||||||
returned: When I(volumes) is C(yes)
|
returned: When I(volumes) is C(true)
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
networks:
|
networks:
|
||||||
description:
|
description:
|
||||||
- List of dict objects containing the basic information about each network.
|
- List of dict objects containing the basic information about each network.
|
||||||
Keys matches the C(docker network ls) output unless I(verbose_output=yes).
|
Keys matches the C(docker network ls) output unless I(verbose_output=true).
|
||||||
See description for I(verbose_output).
|
See description for I(verbose_output).
|
||||||
returned: When I(networks) is C(yes)
|
returned: When I(networks) is C(true)
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
containers:
|
containers:
|
||||||
description:
|
description:
|
||||||
- List of dict objects containing the basic information about each container.
|
- List of dict objects containing the basic information about each container.
|
||||||
Keys matches the C(docker container ls) output unless I(verbose_output=yes).
|
Keys matches the C(docker container ls) output unless I(verbose_output=true).
|
||||||
See description for I(verbose_output).
|
See description for I(verbose_output).
|
||||||
returned: When I(containers) is C(yes)
|
returned: When I(containers) is C(true)
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
images:
|
images:
|
||||||
description:
|
description:
|
||||||
- List of dict objects containing the basic information about each image.
|
- List of dict objects containing the basic information about each image.
|
||||||
Keys matches the C(docker image ls) output unless I(verbose_output=yes).
|
Keys matches the C(docker image ls) output unless I(verbose_output=true).
|
||||||
See description for I(verbose_output).
|
See description for I(verbose_output).
|
||||||
returned: When I(images) is C(yes)
|
returned: When I(images) is C(true)
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
disk_usage:
|
disk_usage:
|
||||||
description:
|
description:
|
||||||
- Information on summary disk usage by images, containers and volumes on docker host
|
- Information on summary disk usage by images, containers and volumes on docker host
|
||||||
unless I(verbose_output=yes). See description for I(verbose_output).
|
unless I(verbose_output=true). See description for I(verbose_output).
|
||||||
returned: When I(disk_usage) is C(yes)
|
returned: When I(disk_usage) is C(true)
|
||||||
type: dict
|
type: dict
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|||||||
@ -60,17 +60,17 @@ options:
|
|||||||
- Use with state 'present' to build an image. Will be the path to a directory containing the context and
|
- Use with state 'present' to build an image. Will be the path to a directory containing the context and
|
||||||
Dockerfile for building an image.
|
Dockerfile for building an image.
|
||||||
type: path
|
type: path
|
||||||
required: yes
|
required: true
|
||||||
pull:
|
pull:
|
||||||
description:
|
description:
|
||||||
- When building an image downloads any updates to the FROM image in Dockerfile.
|
- When building an image downloads any updates to the FROM image in Dockerfile.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
rm:
|
rm:
|
||||||
description:
|
description:
|
||||||
- Remove intermediate containers after build.
|
- Remove intermediate containers after build.
|
||||||
type: bool
|
type: bool
|
||||||
default: yes
|
default: true
|
||||||
network:
|
network:
|
||||||
description:
|
description:
|
||||||
- The network to use for C(RUN) build instructions.
|
- The network to use for C(RUN) build instructions.
|
||||||
@ -79,7 +79,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Do not use cache when building an image.
|
- Do not use cache when building an image.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
etc_hosts:
|
etc_hosts:
|
||||||
description:
|
description:
|
||||||
- Extra hosts to add to C(/etc/hosts) in building containers, as a mapping of hostname to IP address.
|
- Extra hosts to add to C(/etc/hosts) in building containers, as a mapping of hostname to IP address.
|
||||||
@ -115,7 +115,7 @@ options:
|
|||||||
type: str
|
type: str
|
||||||
use_config_proxy:
|
use_config_proxy:
|
||||||
description:
|
description:
|
||||||
- If set to C(yes) and a proxy configuration is specified in the docker client configuration
|
- If set to C(true) and a proxy configuration is specified in the docker client configuration
|
||||||
(by default C($HOME/.docker/config.json)), the corresponding environment variables will
|
(by default C($HOME/.docker/config.json)), the corresponding environment variables will
|
||||||
be set in the container being built.
|
be set in the container being built.
|
||||||
- Needs Docker SDK for Python >= 3.7.0.
|
- Needs Docker SDK for Python >= 3.7.0.
|
||||||
@ -162,7 +162,7 @@ options:
|
|||||||
- Note that image IDs (hashes) are only supported for I(state=absent), for I(state=present) with I(source=load),
|
- Note that image IDs (hashes) are only supported for I(state=absent), for I(state=present) with I(source=load),
|
||||||
and for I(state=present) with I(source=local).
|
and for I(state=present) with I(source=local).
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
pull:
|
pull:
|
||||||
description:
|
description:
|
||||||
- "Specifies options used for pulling images."
|
- "Specifies options used for pulling images."
|
||||||
@ -179,7 +179,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Push the image to the registry. Specify the registry as part of the I(name) or I(repository) parameter.
|
- Push the image to the registry. Specify the registry as part of the I(name) or I(repository) parameter.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
repository:
|
repository:
|
||||||
description:
|
description:
|
||||||
- Use with state C(present) to tag the image.
|
- Use with state C(present) to tag the image.
|
||||||
@ -237,7 +237,7 @@ EXAMPLES = '''
|
|||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: pacur/centos-7:56
|
name: pacur/centos-7:56
|
||||||
repository: dcoppenhagan/myimage:7.56
|
repository: dcoppenhagan/myimage:7.56
|
||||||
push: yes
|
push: true
|
||||||
source: local
|
source: local
|
||||||
|
|
||||||
- name: Tag and push to local registry
|
- name: Tag and push to local registry
|
||||||
@ -247,7 +247,7 @@ EXAMPLES = '''
|
|||||||
# Will be pushed to localhost:5000/centos:7
|
# Will be pushed to localhost:5000/centos:7
|
||||||
repository: localhost:5000/centos
|
repository: localhost:5000/centos
|
||||||
tag: 7
|
tag: 7
|
||||||
push: yes
|
push: true
|
||||||
source: local
|
source: local
|
||||||
|
|
||||||
- name: Add tag latest to image
|
- name: Add tag latest to image
|
||||||
@ -255,7 +255,7 @@ EXAMPLES = '''
|
|||||||
name: myimage:7.1.2
|
name: myimage:7.1.2
|
||||||
repository: myimage:latest
|
repository: myimage:latest
|
||||||
# As 'latest' usually already is present, we need to enable overwriting of existing tags:
|
# As 'latest' usually already is present, we need to enable overwriting of existing tags:
|
||||||
force_tag: yes
|
force_tag: true
|
||||||
source: local
|
source: local
|
||||||
|
|
||||||
- name: Remove image
|
- name: Remove image
|
||||||
@ -270,7 +270,7 @@ EXAMPLES = '''
|
|||||||
path: ./sinatra
|
path: ./sinatra
|
||||||
name: registry.ansible.com/chouseknecht/sinatra
|
name: registry.ansible.com/chouseknecht/sinatra
|
||||||
tag: v1
|
tag: v1
|
||||||
push: yes
|
push: true
|
||||||
source: build
|
source: build
|
||||||
|
|
||||||
- name: Archive image
|
- name: Archive image
|
||||||
@ -284,7 +284,7 @@ EXAMPLES = '''
|
|||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: localhost:5000/myimages/sinatra
|
name: localhost:5000/myimages/sinatra
|
||||||
tag: v1
|
tag: v1
|
||||||
push: yes
|
push: true
|
||||||
load_path: my_sinatra.tar
|
load_path: my_sinatra.tar
|
||||||
source: load
|
source: load
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Refresh existing authentication found in the configuration file.
|
- Refresh existing authentication found in the configuration file.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
aliases:
|
aliases:
|
||||||
- reauth
|
- reauth
|
||||||
config_path:
|
config_path:
|
||||||
@ -90,7 +90,7 @@ EXAMPLES = '''
|
|||||||
registry_url: your.private.registry.io
|
registry_url: your.private.registry.io
|
||||||
username: yourself
|
username: yourself
|
||||||
password: secrets3
|
password: secrets3
|
||||||
reauthorize: yes
|
reauthorize: true
|
||||||
|
|
||||||
- name: Log into DockerHub using a custom config file
|
- name: Log into DockerHub using a custom config file
|
||||||
community.docker.docker_login:
|
community.docker.docker_login:
|
||||||
|
|||||||
@ -18,7 +18,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Name of the network to operate on.
|
- Name of the network to operate on.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
aliases:
|
aliases:
|
||||||
- network_name
|
- network_name
|
||||||
|
|
||||||
@ -53,14 +53,14 @@ options:
|
|||||||
- This option is required if you have changed the IPAM or driver options
|
- This option is required if you have changed the IPAM or driver options
|
||||||
and want an existing network to be updated to use the new options.
|
and want an existing network to be updated to use the new options.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
|
|
||||||
appends:
|
appends:
|
||||||
description:
|
description:
|
||||||
- By default the connected list is canonical, meaning containers not on the list are removed from the network.
|
- By default the connected list is canonical, meaning containers not on the list are removed from the network.
|
||||||
- Use I(appends) to leave existing containers connected.
|
- Use I(appends) to leave existing containers connected.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
aliases:
|
aliases:
|
||||||
- incremental
|
- incremental
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ EXAMPLES = '''
|
|||||||
name: network_one
|
name: network_one
|
||||||
connected:
|
connected:
|
||||||
- container_a
|
- container_a
|
||||||
appends: yes
|
appends: true
|
||||||
|
|
||||||
- name: Create a network with driver options
|
- name: Create a network with driver options
|
||||||
community.docker.docker_network:
|
community.docker.docker_network:
|
||||||
@ -221,14 +221,14 @@ EXAMPLES = '''
|
|||||||
- name: Create a network with IPv6 IPAM config
|
- name: Create a network with IPv6 IPAM config
|
||||||
community.docker.docker_network:
|
community.docker.docker_network:
|
||||||
name: network_ipv6_one
|
name: network_ipv6_one
|
||||||
enable_ipv6: yes
|
enable_ipv6: true
|
||||||
ipam_config:
|
ipam_config:
|
||||||
- subnet: fdd1:ac8c:0557:7ce1::/64
|
- subnet: fdd1:ac8c:0557:7ce1::/64
|
||||||
|
|
||||||
- name: Create a network with IPv6 and custom IPv4 IPAM config
|
- name: Create a network with IPv6 and custom IPv4 IPAM config
|
||||||
community.docker.docker_network:
|
community.docker.docker_network:
|
||||||
name: network_ipv6_two
|
name: network_ipv6_two
|
||||||
enable_ipv6: yes
|
enable_ipv6: true
|
||||||
ipam_config:
|
ipam_config:
|
||||||
- subnet: 172.24.27.0/24
|
- subnet: 172.24.27.0/24
|
||||||
- subnet: fdd1:ac8c:0557:7ce2::/64
|
- subnet: fdd1:ac8c:0557:7ce2::/64
|
||||||
@ -237,7 +237,7 @@ EXAMPLES = '''
|
|||||||
community.docker.docker_network:
|
community.docker.docker_network:
|
||||||
name: network_one
|
name: network_one
|
||||||
state: absent
|
state: absent
|
||||||
force: yes
|
force: true
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|||||||
@ -25,7 +25,7 @@ options:
|
|||||||
- The name of the network to inspect.
|
- The name of the network to inspect.
|
||||||
- When identifying an existing network name may be a name or a long or short network ID.
|
- When identifying an existing network name may be a name or a long or short network ID.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.docker.docker
|
- community.docker.docker
|
||||||
- community.docker.docker.docker_py_1_documentation
|
- community.docker.docker.docker_py_1_documentation
|
||||||
|
|||||||
@ -21,7 +21,7 @@ options:
|
|||||||
- If more than one node is registered using the same hostname the ID must be used,
|
- If more than one node is registered using the same hostname the ID must be used,
|
||||||
otherwise module will fail.
|
otherwise module will fail.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
labels:
|
labels:
|
||||||
description:
|
description:
|
||||||
- User-defined key/value metadata that will be assigned as node attribute.
|
- User-defined key/value metadata that will be assigned as node attribute.
|
||||||
|
|||||||
@ -35,7 +35,7 @@ options:
|
|||||||
- If C(true) then I(name) is ignored.
|
- If C(true) then I(name) is ignored.
|
||||||
- If C(false) then query depends on I(name) presence and value.
|
- If C(false) then query depends on I(name) presence and value.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.docker.docker
|
- community.docker.docker
|
||||||
- community.docker.docker.docker_py_1_documentation
|
- community.docker.docker.docker_py_1_documentation
|
||||||
|
|||||||
@ -23,7 +23,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to prune containers.
|
- Whether to prune containers.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
containers_filters:
|
containers_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting containers to delete.
|
- A dictionary of filter values used for selecting containers to delete.
|
||||||
@ -35,7 +35,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to prune images.
|
- Whether to prune images.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
images_filters:
|
images_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting images to delete.
|
- A dictionary of filter values used for selecting images to delete.
|
||||||
@ -47,7 +47,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to prune networks.
|
- Whether to prune networks.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
networks_filters:
|
networks_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting networks to delete.
|
- A dictionary of filter values used for selecting networks to delete.
|
||||||
@ -58,7 +58,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to prune volumes.
|
- Whether to prune volumes.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
volumes_filters:
|
volumes_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting volumes to delete.
|
- A dictionary of filter values used for selecting volumes to delete.
|
||||||
@ -70,7 +70,7 @@ options:
|
|||||||
- Whether to prune the builder cache.
|
- Whether to prune the builder cache.
|
||||||
- Requires version 3.3.0 of the Docker SDK for Python or newer.
|
- Requires version 3.3.0 of the Docker SDK for Python or newer.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.docker.docker
|
- community.docker.docker
|
||||||
@ -88,28 +88,28 @@ requirements:
|
|||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: Prune containers older than 24h
|
- name: Prune containers older than 24h
|
||||||
community.docker.docker_prune:
|
community.docker.docker_prune:
|
||||||
containers: yes
|
containers: true
|
||||||
containers_filters:
|
containers_filters:
|
||||||
# only consider containers created more than 24 hours ago
|
# only consider containers created more than 24 hours ago
|
||||||
until: 24h
|
until: 24h
|
||||||
|
|
||||||
- name: Prune everything
|
- name: Prune everything
|
||||||
community.docker.docker_prune:
|
community.docker.docker_prune:
|
||||||
containers: yes
|
containers: true
|
||||||
images: yes
|
images: true
|
||||||
networks: yes
|
networks: true
|
||||||
volumes: yes
|
volumes: true
|
||||||
builder_cache: yes
|
builder_cache: true
|
||||||
|
|
||||||
- name: Prune everything (including non-dangling images)
|
- name: Prune everything (including non-dangling images)
|
||||||
community.docker.docker_prune:
|
community.docker.docker_prune:
|
||||||
containers: yes
|
containers: true
|
||||||
images: yes
|
images: true
|
||||||
images_filters:
|
images_filters:
|
||||||
dangling: false
|
dangling: false
|
||||||
networks: yes
|
networks: true
|
||||||
volumes: yes
|
volumes: true
|
||||||
builder_cache: yes
|
builder_cache: true
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|||||||
@ -33,7 +33,7 @@ options:
|
|||||||
- To use binary I(data), it is better to keep it Base64 encoded and let it
|
- To use binary I(data), it is better to keep it Base64 encoded and let it
|
||||||
be decoded by this option.
|
be decoded by this option.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
data_src:
|
data_src:
|
||||||
description:
|
description:
|
||||||
- The file on the target from which to read the secret.
|
- The file on the target from which to read the secret.
|
||||||
@ -50,7 +50,7 @@ options:
|
|||||||
- Use with state C(present) to always remove and recreate an existing secret.
|
- Use with state C(present) to always remove and recreate an existing secret.
|
||||||
- If C(true), an existing secret will be replaced, even if it has not changed.
|
- If C(true), an existing secret will be replaced, even if it has not changed.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
rolling_versions:
|
rolling_versions:
|
||||||
description:
|
description:
|
||||||
- If set to C(true), secrets are created with an increasing version number appended to their name.
|
- If set to C(true), secrets are created with an increasing version number appended to their name.
|
||||||
@ -70,7 +70,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- The name of the secret.
|
- The name of the secret.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Set to C(present), if the secret should exist, and C(absent), if it should not.
|
- Set to C(present), if the secret should exist, and C(absent), if it should not.
|
||||||
@ -154,7 +154,7 @@ EXAMPLES = '''
|
|||||||
community.docker.docker_secret:
|
community.docker.docker_secret:
|
||||||
name: foo
|
name: foo
|
||||||
data: Goodnight everyone!
|
data: Goodnight everyone!
|
||||||
force: yes
|
force: true
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Remove secret foo
|
- name: Remove secret foo
|
||||||
|
|||||||
@ -21,7 +21,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Stack name
|
- Stack name
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Service state.
|
- Service state.
|
||||||
@ -44,13 +44,13 @@ options:
|
|||||||
This will have docker remove the services not present in the
|
This will have docker remove the services not present in the
|
||||||
current stack definition.
|
current stack definition.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
with_registry_auth:
|
with_registry_auth:
|
||||||
description:
|
description:
|
||||||
- If true will add the C(--with-registry-auth) option to the C(docker stack deploy) command.
|
- If true will add the C(--with-registry-auth) option to the C(docker stack deploy) command.
|
||||||
This will have docker send registry authentication details to Swarm agents.
|
This will have docker send registry authentication details to Swarm agents.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
resolve_image:
|
resolve_image:
|
||||||
description:
|
description:
|
||||||
- If set will add the C(--resolve-image) option to the C(docker stack deploy) command.
|
- If set will add the C(--resolve-image) option to the C(docker stack deploy) command.
|
||||||
|
|||||||
@ -21,7 +21,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Stack name.
|
- Stack name.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
|
|||||||
@ -59,7 +59,7 @@ options:
|
|||||||
- Use with state C(present) to force creating a new Swarm, even if already part of one.
|
- Use with state C(present) to force creating a new Swarm, even if already part of one.
|
||||||
- Use with state C(absent) to Leave the swarm even if this node is a manager.
|
- Use with state C(absent) to Leave the swarm even if this node is a manager.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Set to C(present), to create/update a new cluster.
|
- Set to C(present), to create/update a new cluster.
|
||||||
@ -164,17 +164,17 @@ options:
|
|||||||
autolock_managers:
|
autolock_managers:
|
||||||
description:
|
description:
|
||||||
- If set, generate a key and use it to lock data stored on the managers.
|
- If set, generate a key and use it to lock data stored on the managers.
|
||||||
- Docker default value is C(no).
|
- Docker default value is C(false).
|
||||||
- M(community.docker.docker_swarm_info) can be used to retrieve the unlock key.
|
- M(community.docker.docker_swarm_info) can be used to retrieve the unlock key.
|
||||||
type: bool
|
type: bool
|
||||||
rotate_worker_token:
|
rotate_worker_token:
|
||||||
description: Rotate the worker join token.
|
description: Rotate the worker join token.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
rotate_manager_token:
|
rotate_manager_token:
|
||||||
description: Rotate the manager join token.
|
description: Rotate the manager join token.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
data_path_addr:
|
data_path_addr:
|
||||||
description:
|
description:
|
||||||
- Address or interface to use for data path traffic.
|
- Address or interface to use for data path traffic.
|
||||||
|
|||||||
@ -31,7 +31,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to list swarm nodes.
|
- Whether to list swarm nodes.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
nodes_filters:
|
nodes_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting nodes to list.
|
- A dictionary of filter values used for selecting nodes to list.
|
||||||
@ -43,7 +43,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to list swarm services.
|
- Whether to list swarm services.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
services_filters:
|
services_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting services to list.
|
- A dictionary of filter values used for selecting services to list.
|
||||||
@ -55,7 +55,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to list containers.
|
- Whether to list containers.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
tasks_filters:
|
tasks_filters:
|
||||||
description:
|
description:
|
||||||
- A dictionary of filter values used for selecting tasks to list.
|
- A dictionary of filter values used for selecting tasks to list.
|
||||||
@ -67,16 +67,16 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Whether to retrieve the swarm unlock key.
|
- Whether to retrieve the swarm unlock key.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
verbose_output:
|
verbose_output:
|
||||||
description:
|
description:
|
||||||
- When set to C(yes) and I(nodes), I(services) or I(tasks) is set to C(yes), then the module output will
|
- When set to C(true) and I(nodes), I(services) or I(tasks) is set to C(true), then the module output will
|
||||||
contain verbose information about objects matching the full output of API method.
|
contain verbose information about objects matching the full output of API method.
|
||||||
- For details see the documentation of your version of Docker API at U(https://docs.docker.com/engine/api/).
|
- For details see the documentation of your version of Docker API at U(https://docs.docker.com/engine/api/).
|
||||||
- The verbose output in this module contains only subset of information returned by I(_info) module
|
- The verbose output in this module contains only subset of information returned by I(_info) module
|
||||||
for each type of the objects.
|
for each type of the objects.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.docker.docker
|
- community.docker.docker
|
||||||
- community.docker.docker.docker_py_1_documentation
|
- community.docker.docker.docker_py_1_documentation
|
||||||
@ -90,7 +90,7 @@ requirements:
|
|||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: Get info on Docker Swarm
|
- name: Get info on Docker Swarm
|
||||||
community.docker.docker_swarm_info:
|
community.docker.docker_swarm_info:
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Inform about basic flags
|
- name: Inform about basic flags
|
||||||
@ -104,18 +104,18 @@ EXAMPLES = '''
|
|||||||
|
|
||||||
- name: Get info on Docker Swarm and list of registered nodes
|
- name: Get info on Docker Swarm and list of registered nodes
|
||||||
community.docker.docker_swarm_info:
|
community.docker.docker_swarm_info:
|
||||||
nodes: yes
|
nodes: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Get info on Docker Swarm and extended list of registered nodes
|
- name: Get info on Docker Swarm and extended list of registered nodes
|
||||||
community.docker.docker_swarm_info:
|
community.docker.docker_swarm_info:
|
||||||
nodes: yes
|
nodes: true
|
||||||
verbose_output: yes
|
verbose_output: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Get info on Docker Swarm and filtered list of registered nodes
|
- name: Get info on Docker Swarm and filtered list of registered nodes
|
||||||
community.docker.docker_swarm_info:
|
community.docker.docker_swarm_info:
|
||||||
nodes: yes
|
nodes: true
|
||||||
nodes_filters:
|
nodes_filters:
|
||||||
name: mynode
|
name: mynode
|
||||||
register: result
|
register: result
|
||||||
@ -125,7 +125,7 @@ EXAMPLES = '''
|
|||||||
|
|
||||||
- name: Get the swarm unlock key
|
- name: Get the swarm unlock key
|
||||||
community.docker.docker_swarm_info:
|
community.docker.docker_swarm_info:
|
||||||
unlock_key: yes
|
unlock_key: true
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- ansible.builtin.debug:
|
- ansible.builtin.debug:
|
||||||
@ -167,25 +167,25 @@ swarm_unlock_key:
|
|||||||
nodes:
|
nodes:
|
||||||
description:
|
description:
|
||||||
- List of dict objects containing the basic information about each volume.
|
- List of dict objects containing the basic information about each volume.
|
||||||
Keys matches the C(docker node ls) output unless I(verbose_output=yes).
|
Keys matches the C(docker node ls) output unless I(verbose_output=true).
|
||||||
See description for I(verbose_output).
|
See description for I(verbose_output).
|
||||||
returned: When I(nodes) is C(yes)
|
returned: When I(nodes) is C(true)
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
services:
|
services:
|
||||||
description:
|
description:
|
||||||
- List of dict objects containing the basic information about each volume.
|
- List of dict objects containing the basic information about each volume.
|
||||||
Keys matches the C(docker service ls) output unless I(verbose_output=yes).
|
Keys matches the C(docker service ls) output unless I(verbose_output=true).
|
||||||
See description for I(verbose_output).
|
See description for I(verbose_output).
|
||||||
returned: When I(services) is C(yes)
|
returned: When I(services) is C(true)
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
tasks:
|
tasks:
|
||||||
description:
|
description:
|
||||||
- List of dict objects containing the basic information about each volume.
|
- List of dict objects containing the basic information about each volume.
|
||||||
Keys matches the C(docker service ps) output unless I(verbose_output=yes).
|
Keys matches the C(docker service ps) output unless I(verbose_output=true).
|
||||||
See description for I(verbose_output).
|
See description for I(verbose_output).
|
||||||
returned: When I(tasks) is C(yes)
|
returned: When I(tasks) is C(true)
|
||||||
type: list
|
type: list
|
||||||
elements: dict
|
elements: dict
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Config's name as defined at its creation.
|
- Config's name as defined at its creation.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
filename:
|
filename:
|
||||||
description:
|
description:
|
||||||
- Name of the file containing the config. Defaults to the I(config_name) if not specified.
|
- Name of the file containing the config. Defaults to the I(config_name) if not specified.
|
||||||
@ -121,7 +121,7 @@ options:
|
|||||||
- Corresponds to the C(--force) option of C(docker service update).
|
- Corresponds to the C(--force) option of C(docker service update).
|
||||||
- Requires API version >= 1.25.
|
- Requires API version >= 1.25.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
groups:
|
groups:
|
||||||
description:
|
description:
|
||||||
- List of additional group names and/or IDs that the container process will run as.
|
- List of additional group names and/or IDs that the container process will run as.
|
||||||
@ -249,7 +249,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Container path.
|
- Container path.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
type:
|
type:
|
||||||
description:
|
description:
|
||||||
- The mount type.
|
- The mount type.
|
||||||
@ -317,7 +317,7 @@ options:
|
|||||||
- Service name.
|
- Service name.
|
||||||
- Corresponds to the C(--name) option of C(docker service create).
|
- Corresponds to the C(--name) option of C(docker service create).
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
networks:
|
networks:
|
||||||
description:
|
description:
|
||||||
- List of the service networks names or dictionaries.
|
- List of the service networks names or dictionaries.
|
||||||
@ -365,12 +365,12 @@ options:
|
|||||||
description:
|
description:
|
||||||
- The port to make externally available.
|
- The port to make externally available.
|
||||||
type: int
|
type: int
|
||||||
required: no
|
required: false
|
||||||
target_port:
|
target_port:
|
||||||
description:
|
description:
|
||||||
- The port inside the container to expose.
|
- The port inside the container to expose.
|
||||||
type: int
|
type: int
|
||||||
required: yes
|
required: true
|
||||||
protocol:
|
protocol:
|
||||||
description:
|
description:
|
||||||
- What protocol to use.
|
- What protocol to use.
|
||||||
@ -424,7 +424,7 @@ options:
|
|||||||
- If the current image digest should be resolved from registry and updated if changed.
|
- If the current image digest should be resolved from registry and updated if changed.
|
||||||
- Requires API version >= 1.30.
|
- Requires API version >= 1.30.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
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.
|
||||||
@ -522,7 +522,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Secret's name as defined at its creation.
|
- Secret's name as defined at its creation.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
filename:
|
filename:
|
||||||
description:
|
description:
|
||||||
- Name of the file containing the secret. Defaults to the I(secret_name) if not specified.
|
- Name of the file containing the secret. Defaults to the I(secret_name) if not specified.
|
||||||
|
|||||||
@ -24,7 +24,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- The name of the service to inspect.
|
- The name of the service to inspect.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.docker.docker
|
- community.docker.docker
|
||||||
- community.docker.docker.docker_py_1_documentation
|
- community.docker.docker.docker_py_1_documentation
|
||||||
|
|||||||
@ -19,7 +19,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Name of the volume to operate on.
|
- Name of the volume to operate on.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
aliases:
|
aliases:
|
||||||
- name
|
- name
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Name of the volume to inspect.
|
- Name of the volume to inspect.
|
||||||
type: str
|
type: str
|
||||||
required: yes
|
required: true
|
||||||
aliases:
|
aliases:
|
||||||
- volume_name
|
- volume_name
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user