mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-13 19:29:54 +00:00
deploy: 024bdec919
This commit is contained in:
@@ -256,10 +256,10 @@
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The detected container environment.</p>
|
||||
<p>Contains an empty string if no container was detected, or a non-empty string identifying the container environment.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">docker</span></code> indicates that the module ran inside a regular Docker container.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">azure_pipelines</span></code> indicates that the module ran on Azure Pipelines. This seems to no longer be reported.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">github_actions</span></code> indicates that the module ran inside a Docker container on GitHub Actions. It is supported since community.docker 2.4.0.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">podman</span></code> indicates that the module ran inside a regular Podman container. It is supported since community.docker 3.3.0.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">docker</span></code> indicates that the module ran inside a regular Docker container.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">azure_pipelines</span></code> indicates that the module ran on Azure Pipelines. This seems to no longer be reported.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">github_actions</span></code> indicates that the module ran inside a Docker container on GitHub Actions. It is supported since community.docker 2.4.0.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">podman</span></code> indicates that the module ran inside a regular Podman container. It is supported since community.docker 3.3.0.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> always</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Can only return:</span></p>
|
||||
<ul class="simple">
|
||||
|
||||
@@ -188,7 +188,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>requests</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-api-connection-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
</ul>
|
||||
@@ -210,7 +210,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -226,7 +226,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p>Variable: ansible_docker_ca_cert</p></li>
|
||||
@@ -241,7 +241,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p>Variable: ansible_docker_client_cert</p></li>
|
||||
@@ -256,7 +256,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p>Variable: ansible_docker_client_key</p></li>
|
||||
@@ -311,8 +311,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -359,8 +359,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-api-connection-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p>Variable: ansible_docker_ssl_version</p></li>
|
||||
@@ -372,7 +372,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -384,8 +384,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-api-connection-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-api-connection-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -402,8 +402,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-configuration">Configuration:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p>Variable: ansible_docker_tls_hostname</p></li>
|
||||
@@ -430,7 +430,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -451,7 +451,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Does <strong>not work with TCP TLS sockets</strong>! This is caused by the inability to send <code class="docutils literal notranslate"><span class="pre">close_notify</span></code> without closing the connection with Python’s <code class="docutils literal notranslate"><span class="pre">SSLSocket</span></code>s. See <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/605">https://github.com/ansible-collections/community.docker/issues/605</a> for more information.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -184,7 +184,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Permalink to this heading"></a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Uses Docker Compose to start, shutdown and scale services. <strong>This module requires docker-compose < 2.0.0.</strong></p></li>
|
||||
<li><p>Configuration can be read from a <code class="docutils literal notranslate"><span class="pre">docker-compose.yml</span></code> or <code class="docutils literal notranslate"><span class="pre">docker-compose.yaml</span></code> file or inline using the <em>definition</em> option.</p></li>
|
||||
<li><p>Configuration can be read from a <code class="docutils literal notranslate"><span class="pre">docker-compose.yml</span></code> or <code class="docutils literal notranslate"><span class="pre">docker-compose.yaml</span></code> file or inline using the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code> option.</p></li>
|
||||
<li><p>See the examples for more details.</p></li>
|
||||
<li><p>Supports check mode.</p></li>
|
||||
<li><p>This module was called <code class="docutils literal notranslate"><span class="pre">docker_service</span></code> before Ansible 2.8. The usage did not change.</p></li>
|
||||
@@ -218,7 +218,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -226,11 +226,11 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-build"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-build"><strong>build</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-build" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with <em>state</em> <code class="docutils literal notranslate"><span class="pre">present</span></code> to always build images prior to starting the application.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to always build images prior to starting the application.</p>
|
||||
<p>Same as running <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">build</span></code> with the pull option.</p>
|
||||
<p>Images will only be rebuilt if Docker detects a change in the Dockerfile or build directory contents.</p>
|
||||
<p>Use the <em>nocache</em> option to ignore the image cache when performing the build.</p>
|
||||
<p>If an existing image is replaced, services using the image will be recreated unless <em>recreate</em> is <code class="docutils literal notranslate"><span class="pre">never</span></code>.</p>
|
||||
<p>Use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-nocache"><span class="std std-ref"><span class="pre">nocache</span></span></a></strong></code> option to ignore the image cache when performing the build.</p>
|
||||
<p>If an existing image is replaced, services using the image will be recreated unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-recreate"><span class="std std-ref"><span class="pre">recreate=never</span></span></a></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -246,7 +246,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -257,7 +257,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -268,7 +268,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -288,14 +288,14 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-definition" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Compose file describing one or more services, networks and volumes.</p>
|
||||
<p>Mutually exclusive with <em>project_src</em> and <em>files</em>.</p>
|
||||
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-files"><span class="std std-ref"><span class="pre">files</span></span></a></strong></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-dependencies"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-dependencies"><strong>dependencies</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-dependencies" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code> specify whether or not to include linked services.</p>
|
||||
<td><div class="ansible-option-cell"><p>When <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state</span></span></a></strong></code> is <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> specify whether or not to include linked services.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -309,8 +309,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -319,18 +319,18 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-env_file" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 1.9.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>By default environment files are loaded from a <code class="docutils literal notranslate"><span class="pre">.env</span></code> file located directly under the <em>project_src</em> directory.</p>
|
||||
<p><em>env_file</em> can be used to specify the path of a custom environment file instead.</p>
|
||||
<p>The path is relative to the <em>project_src</em> directory.</p>
|
||||
<td><div class="ansible-option-cell"><p>By default environment files are loaded from a <code class="docutils literal notranslate"><span class="pre">.env</span></code> file located directly under the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code> directory.</p>
|
||||
<p><code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-env-file"><span class="std std-ref"><span class="pre">env_file</span></span></a></strong></code> can be used to specify the path of a custom environment file instead.</p>
|
||||
<p>The path is relative to the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code> directory.</p>
|
||||
<p>Requires <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> version 1.25.0 or greater.</p>
|
||||
<p>Note: <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> versions <code class="docutils literal notranslate"><span class="pre"><=1.28</span></code> load the env file from the current working directory of the <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> command rather than <em>project_src</em>.</p>
|
||||
<p>Note: <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> versions <code class="docutils literal notranslate"><span class="pre"><=1.28</span></code> load the env file from the current working directory of the <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> command rather than <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-files"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-files"><strong>files</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-files" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of Compose file names relative to <em>project_src</em>. Overrides <code class="docutils literal notranslate"><span class="pre">docker-compose.yml</span></code> or <code class="docutils literal notranslate"><span class="pre">docker-compose.yaml</span></code>.</p>
|
||||
<td><div class="ansible-option-cell"><p>List of Compose file names relative to <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code>. Overrides <code class="docutils literal notranslate"><span class="pre">docker-compose.yml</span></code> or <code class="docutils literal notranslate"><span class="pre">docker-compose.yaml</span></code>.</p>
|
||||
<p>Files are loaded and merged in the order given.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -350,7 +350,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-nocache"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-nocache"><strong>nocache</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-nocache" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with the <em>build</em> option to ignore the cache during the image build process.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-build"><span class="std std-ref"><span class="pre">build</span></span></a></strong></code> option to ignore the cache during the image build process.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -372,8 +372,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-project_name"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-project-name"><strong>project_name</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-project_name" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a project name. If not provided, the project name is taken from the basename of <em>project_src</em>.</p>
|
||||
<p>Required when <em>definition</em> is provided.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a project name. If not provided, the project name is taken from the basename of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code>.</p>
|
||||
<p>Required when <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code> is provided.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -381,17 +381,17 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-project_src" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to a directory containing a <code class="docutils literal notranslate"><span class="pre">docker-compose.yml</span></code> or <code class="docutils literal notranslate"><span class="pre">docker-compose.yaml</span></code> file.</p>
|
||||
<p>Mutually exclusive with <em>definition</em>.</p>
|
||||
<p>Required when no <em>definition</em> is provided.</p>
|
||||
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code>.</p>
|
||||
<p>Required when no <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code> is provided.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-pull"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-pull"><strong>pull</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-pull" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with <em>state</em> <code class="docutils literal notranslate"><span class="pre">present</span></code> to always pull images prior to starting the application.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to always pull images prior to starting the application.</p>
|
||||
<p>Same as running <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">pull</span></code>.</p>
|
||||
<p>When a new image is pulled, services using the image will be recreated unless <em>recreate</em> is <code class="docutils literal notranslate"><span class="pre">never</span></code>.</p>
|
||||
<p>When a new image is pulled, services using the image will be recreated unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-recreate"><span class="std std-ref"><span class="pre">recreate=never</span></span></a></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -404,8 +404,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-recreate" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>By default containers will be recreated when their configuration differs from the service definition.</p>
|
||||
<p>Setting to <code class="docutils literal notranslate"><span class="pre">never</span></code> ignores configuration differences and leaves existing containers unchanged.</p>
|
||||
<p>Setting to <code class="docutils literal notranslate"><span class="pre">always</span></code> forces recreation of all existing containers.</p>
|
||||
<p>Setting to <code class="ansible-value docutils literal notranslate"><span class="pre">never</span></code> ignores configuration differences and leaves existing containers unchanged.</p>
|
||||
<p>Setting to <code class="ansible-value docutils literal notranslate"><span class="pre">always</span></code> forces recreation of all existing containers.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"always"</span></code></p></li>
|
||||
@@ -418,7 +418,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-remove_images"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-remove-images"><strong>remove_images</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-remove_images" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with <em>state</em> <code class="docutils literal notranslate"><span class="pre">absent</span></code> to remove all images or only local images.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code> to remove all images or only local images.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"all"</span></code></p></li>
|
||||
@@ -442,7 +442,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-remove_volumes"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-remove-volumes"><strong>remove_volumes</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-remove_volumes" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with <em>state</em> <code class="docutils literal notranslate"><span class="pre">absent</span></code> to remove data volumes.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code> to remove data volumes.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -454,8 +454,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-restarted"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-restarted"><strong>restarted</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-restarted" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with <em>state</em> <code class="docutils literal notranslate"><span class="pre">present</span></code> to restart all containers defined in the Compose file.</p>
|
||||
<p>If <em>services</em> is defined, only the containers listed there will be restarted.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to restart all containers defined in the Compose file.</p>
|
||||
<p>If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-services"><span class="std std-ref"><span class="pre">services</span></span></a></strong></code> is defined, only the containers listed there will be restarted.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -467,23 +467,23 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-scale"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-scale"><strong>scale</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-scale" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code> scale services. Provide a dictionary of key/value pairs where the key is the name of the service and the value is an integer count for the number of containers.</p>
|
||||
<td><div class="ansible-option-cell"><p>When <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state</span></span></a></strong></code> is <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> scale services. Provide a dictionary of key/value pairs where the key is the name of the service and the value is an integer count for the number of containers.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-services"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-services"><strong>services</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-services" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code> run <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">up</span></code> resp. <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">stop</span></code> (with <em>stopped</em>) resp. <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">restart</span></code> (with <em>restarted</em>) on a subset of services.</p>
|
||||
<p>If empty, which is the default, the operation will be performed on all services defined in the Compose file (or inline <em>definition</em>).</p>
|
||||
<td><div class="ansible-option-cell"><p>When <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state</span></span></a></strong></code> is <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> run <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">up</span></code> resp. <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">stop</span></code> (with <code class="ansible-value docutils literal notranslate"><span class="pre">stopped</span></code>) resp. <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">restart</span></code> (with <code class="ansible-value docutils literal notranslate"><span class="pre">restarted</span></code>) on a subset of services.</p>
|
||||
<p>If empty, which is the default, the operation will be performed on all services defined in the Compose file (or inline <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code>).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -491,8 +491,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Desired state of the project.</p>
|
||||
<p>Specifying <code class="docutils literal notranslate"><span class="pre">present</span></code> is the same as running <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">up</span></code> resp. <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">stop</span></code> (with <em>stopped</em>) resp. <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">restart</span></code> (with <em>restarted</em>).</p>
|
||||
<p>Specifying <code class="docutils literal notranslate"><span class="pre">absent</span></code> is the same as running <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">down</span></code>.</p>
|
||||
<p>Specifying <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> is the same as running <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">up</span></code> resp. <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">stop</span></code> (with <code class="ansible-value docutils literal notranslate"><span class="pre">stopped</span></code>) resp. <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">restart</span></code> (with <code class="ansible-value docutils literal notranslate"><span class="pre">restarted</span></code>).</p>
|
||||
<p>Specifying <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> is the same as running <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">down</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"absent"</span></code></p></li>
|
||||
@@ -504,8 +504,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-stopped"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-stopped"><strong>stopped</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-stopped" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with <em>state</em> <code class="docutils literal notranslate"><span class="pre">present</span></code> to stop all containers defined in the Compose file.</p>
|
||||
<p>If <em>services</em> is defined, only the containers listed there will be stopped.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to stop all containers defined in the Compose file.</p>
|
||||
<p>If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-services"><span class="std std-ref"><span class="pre">services</span></span></a></strong></code> is defined, only the containers listed there will be stopped.</p>
|
||||
<p>Requires <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> 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.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -519,15 +519,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Timeout in seconds for container shutdown when attached or when containers are already running.</p>
|
||||
<p>By default <code class="docutils literal notranslate"><span class="pre">compose</span></code> will use a <code class="docutils literal notranslate"><span class="pre">10s</span></code> timeout unless <code class="docutils literal notranslate"><span class="pre">default_grace_period</span></code> is defined for a particular service in the <em>project_src</em>.</p>
|
||||
<p>By default <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> will use a <code class="ansible-value docutils literal notranslate"><span class="pre">10</span></code> seconds timeout unless <code class="docutils literal notranslate"><span class="pre">default_grace_period</span></code> is defined for a particular service in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -540,8 +540,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -564,7 +564,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -617,9 +617,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>When connecting to Docker daemon with TLS, you might need to install additional Python packages. For the Docker SDK for Python, version 2.4 or newer, this can be done by installing <code class="docutils literal notranslate"><span class="pre">docker[tls]</span></code> with <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/ansible/builtin/pip_module.html#ansible-collections-ansible-builtin-pip-module" title="(in Ansible vdevel)"><span class="xref std std-ref">ansible.builtin.pip</span></a>.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>This module uses the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -802,7 +802,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-actions" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">complex</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provides the actions to be taken on each service as determined by compose.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> when in check mode or <em>debug</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> when in check mode or <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-module-parameter-debug"><span class="std std-ref"><span class="pre">debug=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
|
||||
@@ -184,7 +184,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Permalink to this heading"></a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Create and remove Docker configs in a Swarm environment. Similar to <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">config</span> <span class="pre">create</span></code> and <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">config</span> <span class="pre">rm</span></code>.</p></li>
|
||||
<li><p>Adds to the metadata of new configs ‘ansible_key’, an encrypted hash representation of the data, which is then used in future runs to test if a config has changed. If ‘ansible_key’ is not present, then a config will not be updated unless the <em>force</em> option is set.</p></li>
|
||||
<li><p>Adds to the metadata of new configs ‘ansible_key’, an encrypted hash representation of the data, which is then used in future runs to test if a config has changed. If ‘ansible_key’ is not present, then a config will not be updated unless the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-force"><span class="std std-ref"><span class="pre">force</span></span></a></strong></code> option is set.</p></li>
|
||||
<li><p>Updates to configs are performed by removing the config and creating it again.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -215,7 +215,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -227,7 +227,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -238,7 +238,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -249,7 +249,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -257,15 +257,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-data" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The value of the config.</p>
|
||||
<p>Mutually exclusive with <em>data_src</em>. One of <em>data</em> and <em>data_src</em> is required if <em>state=present</em>.</p>
|
||||
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data-src"><span class="std std-ref"><span class="pre">data_src</span></span></a></strong></code>. One of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data-src"><span class="std std-ref"><span class="pre">data_src</span></span></a></strong></code> is required if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-data_is_b64"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-config-module-parameter-data-is-b64"><strong>data_is_b64</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-data_is_b64" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, the data is assumed to be Base64 encoded and will be decoded before being used.</p>
|
||||
<p>To use binary <em>data</em>, it is better to keep it Base64 encoded and let it be decoded by this option.</p>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, the data is assumed to be Base64 encoded and will be decoded before being used.</p>
|
||||
<p>To use binary <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code>, it is better to keep it Base64 encoded and let it be decoded by this option.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -279,7 +279,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 1.10.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The file on the target from which to read the config.</p>
|
||||
<p>Mutually exclusive with <em>data</em>. One of <em>data</em> and <em>data_src</em> is required if <em>state=present</em>.</p>
|
||||
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code>. One of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data-src"><span class="std std-ref"><span class="pre">data_src</span></span></a></strong></code> is required if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -300,8 +300,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -309,8 +309,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-force"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-config-module-parameter-force"><strong>force</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to always remove and recreate an existing config.</p>
|
||||
<p>If <code class="docutils literal notranslate"><span class="pre">true</span></code>, an existing config will be replaced, even if it has not been changed.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to always remove and recreate an existing config.</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, an existing config will be replaced, even if it has not been changed.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -322,7 +322,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-labels"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-config-module-parameter-labels"><strong>labels</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-labels" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>A map of key:value meta data, where both the <em>key</em> and <em>value</em> are expected to be a string.</p>
|
||||
<td><div class="ansible-option-cell"><p>A map of key:value meta data, where both the <code class="docutils literal notranslate"><span class="pre">key</span></code> and <code class="docutils literal notranslate"><span class="pre">value</span></code> are expected to be a string.</p>
|
||||
<p>If new meta data is provided, or existing meta data is modified, the config will be updated by removing it and creating it again.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -338,7 +338,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-rolling_versions" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.2.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, configs are created with an increasing version number appended to their name.</p>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, configs are created with an increasing version number appended to their name.</p>
|
||||
<p>Adds a label containing the version number to the managed configs with the name <code class="docutils literal notranslate"><span class="pre">ansible_version</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -351,15 +351,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-config-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-config-module-parameter-state"><strong>state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Set to <code class="docutils literal notranslate"><span class="pre">present</span></code>, if the config should exist, and <code class="docutils literal notranslate"><span class="pre">absent</span></code>, if it should not.</p>
|
||||
<td><div class="ansible-option-cell"><p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code>, if the config should exist, and <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code>, if it should not.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"absent"</span></code></p></li>
|
||||
@@ -372,7 +372,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-template_driver" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.5.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Set to <code class="docutils literal notranslate"><span class="pre">golang</span></code> to use a Go template in <em>data</em> or a Go template file in <em>data_src</em>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">golang</span></code> to use a Go template in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code> or a Go template file in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-data-src"><span class="std std-ref"><span class="pre">data_src</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"golang"</span></code></p></li>
|
||||
@@ -384,7 +384,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -392,8 +392,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-config-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -406,8 +406,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -431,7 +431,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -444,9 +444,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-versions_to_keep" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.2.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When using <em>rolling_versions</em>, the number of old versions of the config to keep.</p>
|
||||
<td><div class="ansible-option-cell"><p>When using <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-rolling-versions"><span class="std std-ref"><span class="pre">rolling_versions</span></span></a></strong></code>, the number of old versions of the config to keep.</p>
|
||||
<p>Extraneous old configs are deleted after the new one is created.</p>
|
||||
<p>Set to <code class="docutils literal notranslate"><span class="pre">-1</span></code> to keep everything or to <code class="docutils literal notranslate"><span class="pre">0</span></code> or <code class="docutils literal notranslate"><span class="pre">1</span></code> to keep only the current one.</p>
|
||||
<p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">-1</span></code> to keep everything or <code class="ansible-value docutils literal notranslate"><span class="pre">0</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">1</span></code> to keep only the current one.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">5</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -495,9 +495,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>When connecting to Docker daemon with TLS, you might need to install additional Python packages. For the Docker SDK for Python, version 2.4 or newer, this can be done by installing <code class="docutils literal notranslate"><span class="pre">docker[tls]</span></code> with <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/ansible/builtin/pip_module.html#ansible-collections-ansible-builtin-pip-module" title="(in Ansible vdevel)"><span class="xref std std-ref">ansible.builtin.pip</span></a>.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>This module uses the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -588,7 +588,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-config_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The ID assigned by Docker to the config object.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"hzehrmyjigmcp2gb6nlhmjqcv"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -598,7 +598,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.2.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The name of the created config object.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-config-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"awesome_config"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -186,7 +186,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Copy a file into a Docker container.</p></li>
|
||||
<li><p>Similar to <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">cp</span></code>.</p></li>
|
||||
<li><p>To copy files in a non-running container, you must provide the <em>owner_id</em> and <em>group_id</em> options. This is also necessary if the container does not contain a <code class="docutils literal notranslate"><span class="pre">/bin/sh</span></code> shell with an <code class="docutils literal notranslate"><span class="pre">id</span></code> tool.</p></li>
|
||||
<li><p>To copy files in a non-running container, you must provide the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-owner-id"><span class="std std-ref"><span class="pre">owner_id</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-group-id"><span class="std std-ref"><span class="pre">group_id</span></span></a></strong></code> options. This is also necessary if the container does not contain a <code class="docutils literal notranslate"><span class="pre">/bin/sh</span></code> shell with an <code class="docutils literal notranslate"><span class="pre">id</span></code> tool.</p></li>
|
||||
</ul>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
@@ -199,7 +199,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -222,7 +222,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -234,7 +234,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -245,7 +245,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -256,7 +256,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -279,16 +279,16 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-content" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The file’s content.</p>
|
||||
<p>If you plan to provide binary data, provide it pre-encoded to base64, and set <em>content_is_b64=true</em>.</p>
|
||||
<p>Mutually exclusive with <em>path</em>. One of <em>content</em> and <em>path</em> is required.</p>
|
||||
<p>If you plan to provide binary data, provide it pre-encoded to base64, and set <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-content-is-b64"><span class="std std-ref"><span class="pre">content_is_b64=true</span></span></a></code>.</p>
|
||||
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-path"><span class="std std-ref"><span class="pre">path</span></span></a></strong></code>. One of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-content"><span class="std std-ref"><span class="pre">content</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-path"><span class="std std-ref"><span class="pre">path</span></span></a></strong></code> is required.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-content_is_b64"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-copy-into-module-parameter-content-is-b64"><strong>content_is_b64</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-content_is_b64" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, the content in <em>content</em> is assumed to be Base64 encoded and will be decoded before being used.</p>
|
||||
<p>To use binary <em>content</em>, it is better to keep it Base64 encoded and let it be decoded by this option. Otherwise you risk the data to be interpreted as UTF-8 and corrupted.</p>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, the content in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-content"><span class="std std-ref"><span class="pre">content</span></span></a></strong></code> is assumed to be Base64 encoded and will be decoded before being used.</p>
|
||||
<p>To use binary <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-content"><span class="std std-ref"><span class="pre">content</span></span></a></strong></code>, it is better to keep it Base64 encoded and let it be decoded by this option. Otherwise you risk the data to be interpreted as UTF-8 and corrupted.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -314,8 +314,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -335,8 +335,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-force"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-copy-into-module-parameter-force"><strong>force</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, force writing the file (without performing any idempotency checks).</p>
|
||||
<p>If set to <code class="docutils literal notranslate"><span class="pre">false</span></code>, only write the file if it does not exist on the target. If a filesystem object exists at the destination, the module will not do any change.</p>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, force writing the file (without performing any idempotency checks).</p>
|
||||
<p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>, only write the file if it does not exist on the target. If a filesystem object exists at the destination, the module will not do any change.</p>
|
||||
<p>If this option is not specified, the module will be idempotent. To verify idempotency, it will try to get information on the filesystem object in the container, and if everything seems to match will download the file from the container to compare it to the file to upload.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -350,7 +350,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-group_id" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The group ID to use when writing the file to disk.</p>
|
||||
<p>If provided, <em>owner_id</em> must also be provided.</p>
|
||||
<p>If provided, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-owner-id"><span class="std std-ref"><span class="pre">owner_id</span></span></a></strong></code> must also be provided.</p>
|
||||
<p>If not provided, the module will try to determine the user and group ID for the current user in the container. This will only work if <code class="docutils literal notranslate"><span class="pre">/bin/sh</span></code> is present in the container and the <code class="docutils literal notranslate"><span class="pre">id</span></code> binary or shell builtin is available. Also the container must be running.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -379,7 +379,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-owner_id" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The owner ID to use when writing the file to disk.</p>
|
||||
<p>If provided, <em>group_id</em> must also be provided.</p>
|
||||
<p>If provided, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-group-id"><span class="std std-ref"><span class="pre">group_id</span></span></a></strong></code> must also be provided.</p>
|
||||
<p>If not provided, the module will try to determine the user and group ID for the current user in the container. This will only work if <code class="docutils literal notranslate"><span class="pre">/bin/sh</span></code> is present in the container and the <code class="docutils literal notranslate"><span class="pre">id</span></code> binary or shell builtin is available. Also the container must be running.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -388,15 +388,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-path" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to a file on the managed node.</p>
|
||||
<p>Mutually exclusive with <em>content</em>. One of <em>content</em> and <em>path</em> is required.</p>
|
||||
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-content"><span class="std std-ref"><span class="pre">content</span></span></a></strong></code>. One of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-content"><span class="std std-ref"><span class="pre">content</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-path"><span class="std std-ref"><span class="pre">path</span></span></a></strong></code> is required.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-copy-into-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -404,7 +404,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -412,8 +412,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-copy-into-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -426,8 +426,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -450,7 +450,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -505,7 +505,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -544,7 +544,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-container_path" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The actual path in the container.</p>
|
||||
<p>Can only be different from <em>container_path</em> when <em>follow=true</em>.</p>
|
||||
<p>Can only be different from <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-container-path"><span class="std std-ref"><span class="pre">container_path</span></span></a></strong></code> when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-copy-into-module-parameter-follow"><span class="std std-ref"><span class="pre">follow=true</span></span></a></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -193,7 +193,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -216,7 +216,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -226,7 +226,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The command to execute.</p>
|
||||
<p>Since this is a list of arguments, no quoting is needed.</p>
|
||||
<p>Exactly one of <em>argv</em> or <em>command</em> must be specified.</p>
|
||||
<p>Exactly one of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-argv"><span class="std std-ref"><span class="pre">argv</span></span></a></strong></code> or <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> must be specified.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -237,7 +237,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -255,7 +255,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -266,7 +266,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -274,7 +274,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-command" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The command to execute.</p>
|
||||
<p>Exactly one of <em>argv</em> or <em>command</em> must be specified.</p>
|
||||
<p>Exactly one of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-argv"><span class="std std-ref"><span class="pre">argv</span></span></a></strong></code> or <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> must be specified.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -301,8 +301,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-detach" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.1.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Whether to run the command synchronously (<em>detach=false</em>, default) or asynchronously (<em>detach=true</em>).</p>
|
||||
<p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, <em>stdin</em> cannot be provided, and the return values <code class="docutils literal notranslate"><span class="pre">stdout</span></code>, <code class="docutils literal notranslate"><span class="pre">stderr</span></code> and <code class="docutils literal notranslate"><span class="pre">rc</span></code> are not returned.</p>
|
||||
<td><div class="ansible-option-cell"><p>Whether to run the command synchronously (<code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code>, default) or asynchronously (<code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=true</span></span></a></code>).</p>
|
||||
<p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-stdin"><span class="std std-ref"><span class="pre">stdin</span></span></a></strong></code> cannot be provided, and the return values <code class="ansible-return-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-return-stdout"><span class="std std-ref"><span class="pre">stdout</span></span></a></code>, <code class="ansible-return-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-return-stderr"><span class="std std-ref"><span class="pre">stderr</span></span></a></code>, and <code class="ansible-return-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-return-rc"><span class="std std-ref"><span class="pre">rc</span></span></a></code> are not returned.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -316,8 +316,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -327,16 +327,16 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.1.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Dictionary of environment variables with their respective values to be passed to the command ran inside the container.</p>
|
||||
<p>Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (for example <code class="docutils literal notranslate"><span class="pre">"true"</span></code>) in order to avoid data loss.</p>
|
||||
<p>Please note that if you are passing values in with Jinja2 templates, like <code class="docutils literal notranslate"><span class="pre">"{{</span> <span class="pre">value</span> <span class="pre">}}"</span></code>, you need to add <code class="docutils literal notranslate"><span class="pre">|</span> <span class="pre">string</span></code> to prevent Ansible to convert strings such as <code class="docutils literal notranslate"><span class="pre">"true"</span></code> back to booleans. The correct way is to use <code class="docutils literal notranslate"><span class="pre">"{{</span> <span class="pre">value</span> <span class="pre">|</span> <span class="pre">string</span> <span class="pre">}}"</span></code>.</p>
|
||||
<p>Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (for example <code class="ansible-value docutils literal notranslate"><span class="pre">"true"</span></code>) in order to avoid data loss.</p>
|
||||
<p>Please note that if you are passing values in with Jinja2 templates, like <code class="ansible-value docutils literal notranslate"><span class="pre">"{{</span> <span class="pre">value</span> <span class="pre">}}"</span></code>, you need to add <code class="ansible-value docutils literal notranslate"><span class="pre">|</span> <span class="pre">string</span></code> to prevent Ansible to convert strings such as <code class="ansible-value docutils literal notranslate"><span class="pre">"true"</span></code> back to booleans. The correct way is to use <code class="ansible-value docutils literal notranslate"><span class="pre">"{{</span> <span class="pre">value</span> <span class="pre">|</span> <span class="pre">string</span> <span class="pre">}}"</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-exec-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -344,14 +344,14 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-stdin" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Set the stdin of the command directly to the specified value.</p>
|
||||
<p>Can only be used if <em>detach=false</em>.</p>
|
||||
<p>Can only be used if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-stdin_add_newline"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-exec-module-parameter-stdin-add-newline"><strong>stdin_add_newline</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-stdin_add_newline" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, appends a newline to <em>stdin</em>.</p>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, appends a newline to <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-stdin"><span class="std std-ref"><span class="pre">stdin</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -376,7 +376,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -384,8 +384,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-exec-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -398,8 +398,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -441,7 +441,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -495,8 +495,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Does not support <code class="docutils literal notranslate"><span class="pre">check_mode</span></code>.</p></li>
|
||||
<li><p>Does <strong>not work with TCP TLS sockets</strong> when using <em>stdin</em>. This is caused by the inability to send <code class="docutils literal notranslate"><span class="pre">close_notify</span></code> without closing the connection with Python’s <code class="docutils literal notranslate"><span class="pre">SSLSocket</span></code>s. See <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/605">https://github.com/ansible-collections/community.docker/issues/605</a> for more information.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Does <strong>not work with TCP TLS sockets</strong> when using <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-stdin"><span class="std std-ref"><span class="pre">stdin</span></span></a></strong></code>. This is caused by the inability to send <code class="docutils literal notranslate"><span class="pre">close_notify</span></code> without closing the connection with Python’s <code class="docutils literal notranslate"><span class="pre">SSLSocket</span></code>s. See <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/605">https://github.com/ansible-collections/community.docker/issues/605</a> for more information.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -546,7 +546,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.1.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The execution ID of the command.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <em>detach=true</em></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"249d9e3075655baf705ed8f40488c5e9434049cf3431976f1bfdb73741c574c5"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -555,7 +555,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-rc" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The exit code of the command.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <em>detach=false</em></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">0</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -564,7 +564,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-stderr" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The standard error output of the container command.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <em>detach=false</em></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -572,7 +572,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-stdout" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The standard output of the container command.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <em>detach=false</em></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-exec-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -193,7 +193,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-info-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -216,7 +216,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -228,7 +228,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -239,7 +239,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -250,7 +250,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -271,8 +271,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -288,8 +288,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-info-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -297,7 +297,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -305,8 +305,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-info-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-info-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -319,8 +319,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -343,7 +343,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -398,7 +398,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -436,7 +436,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-container" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Facts representing the current state of the container. Matches the docker inspection output.</p>
|
||||
<p>Will be <code class="docutils literal notranslate"><span class="pre">none</span></code> if container does not exist.</p>
|
||||
<p>Will be <code class="ansible-value docutils literal notranslate"><span class="pre">none</span></code> if container does not exist.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> always</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"{</span> <span class="pre">\"AppArmorProfile\":</span> <span class="pre">\"\",</span> <span class="pre">\"Args\":</span> <span class="pre">[],</span> <span class="pre">\"Config\":</span> <span class="pre">{</span> <span class="pre">\"AttachStderr\":</span> <span class="pre">false,</span> <span class="pre">\"AttachStdin\":</span> <span class="pre">false,</span> <span class="pre">\"AttachStdout\":</span> <span class="pre">false,</span> <span class="pre">\"Cmd\":</span> <span class="pre">[</span> <span class="pre">\"/usr/bin/supervisord\"</span> <span class="pre">],</span> <span class="pre">\"Domainname\":</span> <span class="pre">\"\",</span> <span class="pre">\"Entrypoint\":</span> <span class="pre">null,</span> <span class="pre">\"Env\":</span> <span class="pre">[</span> <span class="pre">\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"</span> <span class="pre">],</span> <span class="pre">\"ExposedPorts\":</span> <span class="pre">{</span> <span class="pre">\"443/tcp\":</span> <span class="pre">{},</span> <span class="pre">\"80/tcp\":</span> <span class="pre">{}</span> <span class="pre">},</span> <span class="pre">\"Hostname\":</span> <span class="pre">\"8e47bf643eb9\",</span> <span class="pre">\"Image\":</span> <span class="pre">\"lnmp_nginx:v1\",</span> <span class="pre">\"Labels\":</span> <span class="pre">{},</span> <span class="pre">\"OnBuild\":</span> <span class="pre">null,</span> <span class="pre">\"OpenStdin\":</span> <span class="pre">false,</span> <span class="pre">\"StdinOnce\":</span> <span class="pre">false,</span> <span class="pre">\"Tty\":</span> <span class="pre">false,</span> <span class="pre">\"User\":</span> <span class="pre">\"\",</span> <span class="pre">\"Volumes\":</span> <span class="pre">{</span> <span class="pre">\"/tmp/lnmp/nginx-sites/logs/\":</span> <span class="pre">{}</span> <span class="pre">},</span> <span class="pre">...</span> <span class="pre">}"</span></code></p>
|
||||
</div></td>
|
||||
|
||||
@@ -193,7 +193,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -216,7 +216,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -225,7 +225,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-auto_remove" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Enable auto-removal of the container on daemon side when the container’s process exits.</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -248,7 +248,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -292,7 +292,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-cleanup"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-cleanup"><strong>cleanup</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-cleanup" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with <em>detach=false</em> to remove the container after successful execution.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code> to remove the container after successful execution.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -308,7 +308,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -319,7 +319,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -328,7 +328,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Command to execute when the container starts. A command may be either a string or a list.</p>
|
||||
<p>Prior to version 2.4, strings were split on commas.</p>
|
||||
<p>See <em>command_handling</em> for differences in how strings and lists are handled.</p>
|
||||
<p>See <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-command-handling"><span class="std std-ref"><span class="pre">command_handling</span></span></a></strong></code> for differences in how strings and lists are handled.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -336,10 +336,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-command_handling" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 1.9.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The default behavior for <em>command</em> (when provided as a list) and <em>entrypoint</em> is to convert them to strings without considering shell quoting rules. (For comparing idempotency, the resulting string is split considering shell quoting rules.)</p>
|
||||
<p>Also, setting <em>command</em> to an empty list of string, and setting <em>entrypoint</em> to an empty list will be handled as if these options are not specified. This is different from idempotency handling for other container-config related options.</p>
|
||||
<p>When this is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, which was the default until community.docker 3.0.0, the current behavior will be kept.</p>
|
||||
<p>When this is set to <code class="docutils literal notranslate"><span class="pre">correct</span></code>, these options are kept as lists, and an empty value or empty list will be handled correctly for idempotency checks. This has been the default since community.docker 3.0.0.</p>
|
||||
<td><div class="ansible-option-cell"><p>The default behavior for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> (when provided as a list) and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-entrypoint"><span class="std std-ref"><span class="pre">entrypoint</span></span></a></strong></code> is to convert them to strings without considering shell quoting rules. (For comparing idempotency, the resulting string is split considering shell quoting rules.)</p>
|
||||
<p>Also, setting <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> to an empty list of string, and setting <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-entrypoint"><span class="std std-ref"><span class="pre">entrypoint</span></span></a></strong></code> to an empty list will be handled as if these options are not specified. This is different from idempotency handling for other container-config related options.</p>
|
||||
<p>When this is set to <code class="ansible-value docutils literal notranslate"><span class="pre">compatibility</span></code>, which was the default until community.docker 3.0.0, the current behavior will be kept.</p>
|
||||
<p>When this is set to <code class="ansible-value docutils literal notranslate"><span class="pre">correct</span></code>, these options are kept as lists, and an empty value or empty list will be handled correctly for idempotency checks. This has been the default since community.docker 3.0.0.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"compatibility"</span></code></p></li>
|
||||
@@ -352,11 +352,11 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-comparisons" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Allows to specify how properties of existing containers are compared with module options to decide whether the container should be recreated / updated or not.</p>
|
||||
<p>Only options which correspond to the state of a container as handled by the Docker daemon can be specified, as well as <em>networks</em>.</p>
|
||||
<p>Must be a dictionary specifying for an option one of the keys <code class="docutils literal notranslate"><span class="pre">strict</span></code>, <code class="docutils literal notranslate"><span class="pre">ignore</span></code> and <code class="docutils literal notranslate"><span class="pre">allow_more_present</span></code>.</p>
|
||||
<p>If <code class="docutils literal notranslate"><span class="pre">strict</span></code> is specified, values are tested for equality, and changes always result in updating or restarting. If <code class="docutils literal notranslate"><span class="pre">ignore</span></code> is specified, changes are ignored.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">allow_more_present</span></code> is allowed only for lists, sets and dicts. If it is specified for lists or sets, the container will only be updated or restarted if the module option contains a value which is not present in the container’s options. If the option is specified for a dict, the container will only be updated or restarted if the module option contains a key which is not present in the container’s option, or if the value of a key present differs.</p>
|
||||
<p>The wildcard option <code class="docutils literal notranslate"><span class="pre">*</span></code> can be used to set one of the default values <code class="docutils literal notranslate"><span class="pre">strict</span></code> or <code class="docutils literal notranslate"><span class="pre">ignore</span></code> to <em>all</em> comparisons which are not explicitly set to other values.</p>
|
||||
<p>Only options which correspond to the state of a container as handled by the Docker daemon can be specified, as well as <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code>.</p>
|
||||
<p>Must be a dictionary specifying for an option one of the keys <code class="ansible-value docutils literal notranslate"><span class="pre">strict</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">ignore</span></code> and <code class="ansible-value docutils literal notranslate"><span class="pre">allow_more_present</span></code>.</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">strict</span></code> is specified, values are tested for equality, and changes always result in updating or restarting. If <code class="ansible-value docutils literal notranslate"><span class="pre">ignore</span></code> is specified, changes are ignored.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">allow_more_present</span></code> is allowed only for lists, sets and dicts. If it is specified for lists or sets, the container will only be updated or restarted if the module option contains a value which is not present in the container’s options. If the option is specified for a dict, the container will only be updated or restarted if the module option contains a key which is not present in the container’s option, or if the value of a key present differs.</p>
|
||||
<p>The wildcard option <code class="docutils literal notranslate"><span class="pre">*</span></code> can be used to set one of the default values <code class="ansible-value docutils literal notranslate"><span class="pre">strict</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">ignore</span></code> to <em>all</em> comparisons which are not explicitly set to other values.</p>
|
||||
<p>See the examples for details.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -365,8 +365,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-container_default_behavior" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>In older versions of this module, various module options used to have default values. This caused problems with containers which use different values for these options.</p>
|
||||
<p>The default value is now <code class="docutils literal notranslate"><span class="pre">no_defaults</span></code>. To restore the old behavior, set it to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, which will ensure that the default values are used when the values are not explicitly specified by the user.</p>
|
||||
<p>This affects the <em>auto_remove</em>, <em>detach</em>, <em>init</em>, <em>interactive</em>, <em>memory</em>, <em>paused</em>, <em>privileged</em>, <em>read_only</em> and <em>tty</em> options.</p>
|
||||
<p>The default value is now <code class="ansible-value docutils literal notranslate"><span class="pre">no_defaults</span></code>. To restore the old behavior, set it to <code class="ansible-value docutils literal notranslate"><span class="pre">compatibility</span></code>, which will ensure that the default values are used when the values are not explicitly specified by the user.</p>
|
||||
<p>This affects the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-auto-remove"><span class="std std-ref"><span class="pre">auto_remove</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-detach"><span class="std std-ref"><span class="pre">detach</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-init"><span class="std std-ref"><span class="pre">init</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-interactive"><span class="std std-ref"><span class="pre">interactive</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-memory"><span class="std std-ref"><span class="pre">memory</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-paused"><span class="std std-ref"><span class="pre">paused</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-privileged"><span class="std std-ref"><span class="pre">privileged</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-read-only"><span class="std std-ref"><span class="pre">read_only</span></span></a></strong></code>, and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-tty"><span class="std std-ref"><span class="pre">tty</span></span></a></strong></code> options.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"compatibility"</span></code></p></li>
|
||||
@@ -379,7 +379,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-cpu_period" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Limit CPU CFS (Completely Fair Scheduler) period.</p>
|
||||
<p>See <em>cpus</em> for an easier to use alternative.</p>
|
||||
<p>See <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-cpus"><span class="std std-ref"><span class="pre">cpus</span></span></a></strong></code> for an easier to use alternative.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -387,7 +387,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-cpu_quota" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Limit CPU CFS (Completely Fair Scheduler) quota.</p>
|
||||
<p>See <em>cpus</em> for an easier to use alternative.</p>
|
||||
<p>See <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-cpus"><span class="std std-ref"><span class="pre">cpus</span></span></a></strong></code> for an easier to use alternative.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -402,21 +402,21 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-cpus" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">float</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Specify how much of the available CPU resources a container can use.</p>
|
||||
<p>A value of <code class="docutils literal notranslate"><span class="pre">1.5</span></code> means that at most one and a half CPU (core) will be used.</p>
|
||||
<p>A value of <code class="ansible-value docutils literal notranslate"><span class="pre">1.5</span></code> means that at most one and a half CPU (core) will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-cpuset_cpus"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-cpuset-cpus"><strong>cpuset_cpus</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-cpuset_cpus" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>CPUs in which to allow execution <code class="docutils literal notranslate"><span class="pre">1,3</span></code> or <code class="docutils literal notranslate"><span class="pre">1-3</span></code>.</p>
|
||||
<td><div class="ansible-option-cell"><p>CPUs in which to allow execution <code class="ansible-value docutils literal notranslate"><span class="pre">1,3</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">1-3</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-cpuset_mems"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-cpuset-mems"><strong>cpuset_mems</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-cpuset_mems" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Memory nodes (MEMs) in which to allow execution <code class="docutils literal notranslate"><span class="pre">0-3</span></code> or <code class="docutils literal notranslate"><span class="pre">0,1</span></code>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Memory nodes (MEMs) in which to allow execution <code class="ansible-value docutils literal notranslate"><span class="pre">0-3</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">0,1</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -438,8 +438,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Define the default host IP to use.</p>
|
||||
<p>Must be an empty string, an IPv4 address, or an IPv6 address.</p>
|
||||
<p>With Docker 20.10.2 or newer, this should be set to an empty string (<code class="docutils literal notranslate"><span class="pre">""</span></code>) to avoid the port bindings without an explicit IP address to only bind to IPv4. See <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/70">https://github.com/ansible-collections/community.docker/issues/70</a> for details.</p>
|
||||
<p>By default, the module will try to auto-detect this value from the <code class="docutils literal notranslate"><span class="pre">bridge</span></code> network’s <code class="docutils literal notranslate"><span class="pre">com.docker.network.bridge.host_binding_ipv4</span></code> option. If it cannot auto-detect it, it will fall back to <code class="docutils literal notranslate"><span class="pre">0.0.0.0</span></code>.</p>
|
||||
<p>With Docker 20.10.2 or newer, this should be set to an empty string (<code class="ansible-value docutils literal notranslate"><span class="pre">""</span></code>) to avoid the port bindings without an explicit IP address to only bind to IPv4. See <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/70">https://github.com/ansible-collections/community.docker/issues/70</a> for details.</p>
|
||||
<p>By default, the module will try to auto-detect this value from the <code class="docutils literal notranslate"><span class="pre">bridge</span></code> network’s <code class="docutils literal notranslate"><span class="pre">com.docker.network.bridge.host_binding_ipv4</span></code> option. If it cannot auto-detect it, it will fall back to <code class="ansible-value docutils literal notranslate"><span class="pre">0.0.0.0</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -448,7 +448,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Enable detached mode to leave the container running in background.</p>
|
||||
<p>If disabled, the task will reflect the status of the container run (failed if the command failed).</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -475,7 +475,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-device_read_bps/rate" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Device read limit in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>.</p>
|
||||
<p>Number is a positive integer. Unit can be one of <code class="docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Number is a positive integer. Unit can be one of <code class="ansible-value docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="ansible-value docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="ansible-value docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="ansible-value docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Omitting the unit defaults to bytes.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -524,7 +524,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-device_requests/count" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Number or devices to request.</p>
|
||||
<p>Set to <code class="docutils literal notranslate"><span class="pre">-1</span></code> to request all available devices.</p>
|
||||
<p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">-1</span></code> to request all available devices.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -567,7 +567,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-device_write_bps/rate" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Device read limit in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>.</p>
|
||||
<p>Number is a positive integer. Unit can be one of <code class="docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Number is a positive integer. Unit can be one of <code class="ansible-value docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="ansible-value docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="ansible-value docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="ansible-value docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Omitting the unit defaults to bytes.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -628,8 +628,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -645,7 +645,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-entrypoint" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Command that overwrites the default <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code> of the image.</p>
|
||||
<p>See <em>command_handling</em> for differences in how strings and lists are handled.</p>
|
||||
<p>See <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-command-handling"><span class="std std-ref"><span class="pre">command_handling</span></span></a></strong></code> for differences in how strings and lists are handled.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -653,16 +653,16 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-env" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Dictionary of key,value pairs.</p>
|
||||
<p>Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (for example <code class="docutils literal notranslate"><span class="pre">"true"</span></code>) in order to avoid data loss.</p>
|
||||
<p>Please note that if you are passing values in with Jinja2 templates, like <code class="docutils literal notranslate"><span class="pre">"{{</span> <span class="pre">value</span> <span class="pre">}}"</span></code>, you need to add <code class="docutils literal notranslate"><span class="pre">|</span> <span class="pre">string</span></code> to prevent Ansible to convert strings such as <code class="docutils literal notranslate"><span class="pre">"true"</span></code> back to booleans. The correct way is to use <code class="docutils literal notranslate"><span class="pre">"{{</span> <span class="pre">value</span> <span class="pre">|</span> <span class="pre">string</span> <span class="pre">}}"</span></code>.</p>
|
||||
<p>Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (for example <code class="ansible-value docutils literal notranslate"><span class="pre">"true"</span></code>) in order to avoid data loss.</p>
|
||||
<p>Please note that if you are passing values in with Jinja2 templates, like <code class="ansible-value docutils literal notranslate"><span class="pre">"{{</span> <span class="pre">value</span> <span class="pre">}}"</span></code>, you need to add <code class="ansible-value docutils literal notranslate"><span class="pre">|</span> <span class="pre">string</span></code> to prevent Ansible to convert strings such as <code class="ansible-value docutils literal notranslate"><span class="pre">"true"</span></code> back to booleans. The correct way is to use <code class="ansible-value docutils literal notranslate"><span class="pre">"{{</span> <span class="pre">value</span> <span class="pre">|</span> <span class="pre">string</span> <span class="pre">}}"</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-env_file"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-env-file"><strong>env_file</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-env_file" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to a file, present on the target, containing environment variables <em>FOO=BAR</em>.</p>
|
||||
<p>If variable also present in <em>env</em>, then the <em>env</em> value will override.</p>
|
||||
<td><div class="ansible-option-cell"><p>Path to a file, present on the target, containing environment variables <code class="docutils literal notranslate"><span class="pre">FOO=BAR</span></code>.</p>
|
||||
<p>If variable also present in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-env"><span class="std std-ref"><span class="pre">env</span></span></a></strong></code>, then the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-env"><span class="std std-ref"><span class="pre">env</span></span></a></strong></code> value will override.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -710,7 +710,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Configure a check that is run to determine whether or not containers for this service are “healthy”.</p>
|
||||
<p>See the docs for the <a class="reference external" href="https://docs.docker.com/engine/reference/builder/#healthcheck">HEALTHCHECK Dockerfile instruction</a> for details on how healthchecks work.</p>
|
||||
<p><em>interval</em>, <em>timeout</em> and <em>start_period</em> are specified as durations. They accept duration as a string in a format that look like: <code class="docutils literal notranslate"><span class="pre">5h34m56s</span></code>, <code class="docutils literal notranslate"><span class="pre">1m30s</span></code> etc. The supported units are <code class="docutils literal notranslate"><span class="pre">us</span></code>, <code class="docutils literal notranslate"><span class="pre">ms</span></code>, <code class="docutils literal notranslate"><span class="pre">s</span></code>, <code class="docutils literal notranslate"><span class="pre">m</span></code> and <code class="docutils literal notranslate"><span class="pre">h</span></code>.</p>
|
||||
<p><code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-healthcheck-interval"><span class="std std-ref"><span class="pre">healthcheck.interval</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-healthcheck-timeout"><span class="std std-ref"><span class="pre">healthcheck.timeout</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-healthcheck-start-period"><span class="std std-ref"><span class="pre">healthcheck.start_period</span></span></a></strong></code> are specified as durations. They accept duration as a string in a format that look like: <code class="ansible-value docutils literal notranslate"><span class="pre">5h34m56s</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">1m30s</span></code>, and so on. The supported units are <code class="ansible-value docutils literal notranslate"><span class="pre">us</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">ms</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">s</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">m</span></code> and <code class="ansible-value docutils literal notranslate"><span class="pre">h</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -718,7 +718,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-healthcheck/interval" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Time between running the check.</p>
|
||||
<p>The default used by the Docker daemon is <code class="docutils literal notranslate"><span class="pre">30s</span></code>.</p>
|
||||
<p>The default used by the Docker daemon is <code class="ansible-value docutils literal notranslate"><span class="pre">30s</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -726,7 +726,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-healthcheck/retries" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Consecutive number of failures needed to report unhealthy.</p>
|
||||
<p>The default used by the Docker daemon is <code class="docutils literal notranslate"><span class="pre">3</span></code>.</p>
|
||||
<p>The default used by the Docker daemon is <code class="ansible-value docutils literal notranslate"><span class="pre">3</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -734,7 +734,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-healthcheck/start_period" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Start period for the container to initialize before starting health-retries countdown.</p>
|
||||
<p>The default used by the Docker daemon is <code class="docutils literal notranslate"><span class="pre">0s</span></code>.</p>
|
||||
<p>The default used by the Docker daemon is <code class="ansible-value docutils literal notranslate"><span class="pre">0s</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -742,7 +742,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-healthcheck/test" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">any</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Command to run to check health.</p>
|
||||
<p>Must be either a string or a list. If it is a list, the first item must be one of <code class="docutils literal notranslate"><span class="pre">NONE</span></code>, <code class="docutils literal notranslate"><span class="pre">CMD</span></code> or <code class="docutils literal notranslate"><span class="pre">CMD-SHELL</span></code>.</p>
|
||||
<p>Must be either a string or a list. If it is a list, the first item must be one of <code class="ansible-value docutils literal notranslate"><span class="pre">NONE</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">CMD</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">CMD-SHELL</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -750,7 +750,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-healthcheck/timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Maximum time to allow one check to run.</p>
|
||||
<p>The default used by the Docker daemon is <code class="docutils literal notranslate"><span class="pre">30s</span></code>.</p>
|
||||
<p>The default used by the Docker daemon is <code class="ansible-value docutils literal notranslate"><span class="pre">30s</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -764,9 +764,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ignore_image"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-ignore-image"><strong>ignore_image</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ignore_image" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code> or <code class="docutils literal notranslate"><span class="pre">started</span></code>, the module compares the configuration of an existing container to requested configuration. The evaluation includes the image version. If the image version in the registry does not match the container, the container will be recreated. You can stop this behavior by setting <em>ignore_image</em> to <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p><strong>Warning:</strong> This option is ignored if <code class="docutils literal notranslate"><span class="pre">image:</span> <span class="pre">ignore</span></code> or <code class="docutils literal notranslate"><span class="pre">*:</span> <span class="pre">ignore</span></code> is specified in the <em>comparisons</em> option.</p>
|
||||
<p>This option is deprecated since community.docker 3.2.0 and will be removed in community.docker 4.0.0. Use <code class="docutils literal notranslate"><span class="pre">image:</span> <span class="pre">ignore</span></code> in <em>comparisons</em> instead of <em>ignore_image=true</em>.</p>
|
||||
<td><div class="ansible-option-cell"><p>When <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-state"><span class="std std-ref"><span class="pre">state</span></span></a></strong></code> is <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">started</span></code>, the module compares the configuration of an existing container to requested configuration. The evaluation includes the image version. If the image version in the registry does not match the container, the container will be recreated. You can stop this behavior by setting <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-ignore-image"><span class="std std-ref"><span class="pre">ignore_image</span></span></a></strong></code> to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p><strong>Warning:</strong> This option is ignored if <code class="docutils literal notranslate"><span class="pre">image:</span> <span class="pre">ignore</span></code> or <code class="docutils literal notranslate"><span class="pre">*:</span> <span class="pre">ignore</span></code> is specified in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> option.</p>
|
||||
<p>This option is deprecated since community.docker 3.2.0 and will be removed in community.docker 4.0.0. Use <code class="docutils literal notranslate"><span class="pre">image:</span> <span class="pre">ignore</span></code> in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> instead of <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-ignore-image"><span class="std std-ref"><span class="pre">ignore_image=true</span></span></a></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -778,8 +778,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-image"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-image"><strong>image</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-image" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Repository path and tag used to create the container. If an image is not found or pull is true, the image will be pulled from the registry. If no tag is included, <code class="docutils literal notranslate"><span class="pre">latest</span></code> will be used.</p>
|
||||
<p>Can also be an image ID. If this is the case, the image is assumed to be available locally. The <em>pull</em> option is ignored for this case.</p>
|
||||
<td><div class="ansible-option-cell"><p>Repository path and tag used to create the container. If an image is not found or pull is true, the image will be pulled from the registry. If no tag is included, <code class="ansible-value docutils literal notranslate"><span class="pre">latest</span></code> will be used.</p>
|
||||
<p>Can also be an image ID. If this is the case, the image is assumed to be available locally. The <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-pull"><span class="std std-ref"><span class="pre">pull</span></span></a></strong></code> option is ignored for this case.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -788,9 +788,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 3.0.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Determines which image to use for idempotency checks that depend on image parameters.</p>
|
||||
<p>The default, <code class="docutils literal notranslate"><span class="pre">desired-image</span></code>, will use the image that is provided to the module via the <em>image</em> parameter.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">current-image</span></code> will use the image that the container is currently using, if the container exists. It falls back to the image that is provided in case the container does not yet exist.</p>
|
||||
<p>This affects the <em>env</em>, <em>env_file</em>, <em>exposed_ports</em>, <em>labels</em>, and <em>volumes</em> options.</p>
|
||||
<p>The default, <code class="ansible-value docutils literal notranslate"><span class="pre">desired-image</span></code>, will use the image that is provided to the module via the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-image"><span class="std std-ref"><span class="pre">image</span></span></a></strong></code> parameter.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">current-image</span></code> will use the image that the container is currently using, if the container exists. It falls back to the image that is provided in case the container does not yet exist.</p>
|
||||
<p>This affects the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-env"><span class="std std-ref"><span class="pre">env</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-env-file"><span class="std std-ref"><span class="pre">env_file</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-exposed-ports"><span class="std std-ref"><span class="pre">exposed_ports</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code>, and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-volumes"><span class="std std-ref"><span class="pre">volumes</span></span></a></strong></code> options.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">"desired-image"</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -804,9 +804,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.6.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>How to handle labels inherited from the image that are not set explicitly.</p>
|
||||
<p>When <code class="docutils literal notranslate"><span class="pre">ignore</span></code>, labels that are present in the image but not specified in <em>labels</em> will be ignored. This is useful to avoid having to specify the image labels in <em>labels</em> while keeping labels <em>comparisons</em> <code class="docutils literal notranslate"><span class="pre">strict</span></code>.</p>
|
||||
<p>When <code class="docutils literal notranslate"><span class="pre">fail</span></code>, if there are labels present in the image which are not set from <em>labels</em>, the module will fail. This prevents introducing unexpected labels from the base image.</p>
|
||||
<p><strong>Warning:</strong> This option is ignored unless <code class="docutils literal notranslate"><span class="pre">labels:</span> <span class="pre">strict</span></code> or <code class="docutils literal notranslate"><span class="pre">*:</span> <span class="pre">strict</span></code> is specified in the <em>comparisons</em> option.</p>
|
||||
<p>When <code class="ansible-value docutils literal notranslate"><span class="pre">ignore</span></code>, labels that are present in the image but not specified in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> will be ignored. This is useful to avoid having to specify the image labels in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> while keeping labels <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> <code class="ansible-value docutils literal notranslate"><span class="pre">strict</span></code>.</p>
|
||||
<p>When <code class="ansible-value docutils literal notranslate"><span class="pre">fail</span></code>, if there are labels present in the image which are not set from <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code>, the module will fail. This prevents introducing unexpected labels from the base image.</p>
|
||||
<p><strong>Warning:</strong> This option is ignored unless <code class="docutils literal notranslate"><span class="pre">labels:</span> <span class="pre">strict</span></code> or <code class="docutils literal notranslate"><span class="pre">*:</span> <span class="pre">strict</span></code> is specified in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> option.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">"ignore"</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -820,9 +820,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 3.2.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Determines what the module does if the image matches, but the image name in the container’s configuration does not match the image name provided to the module.</p>
|
||||
<p>This is ignored if <code class="docutils literal notranslate"><span class="pre">image:</span> <span class="pre">ignore</span></code> is set in <em>comparisons</em>.</p>
|
||||
<p>If set to <code class="docutils literal notranslate"><span class="pre">recreate</span></code> the container will be recreated.</p>
|
||||
<p>If set to <code class="docutils literal notranslate"><span class="pre">ignore</span></code> the container will not be recreated because of this. It might still get recreated for other reasons. This has been the default behavior of the module for a long time, but might not be what users expect.</p>
|
||||
<p>This is ignored if <code class="docutils literal notranslate"><span class="pre">image:</span> <span class="pre">ignore</span></code> is set in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code>.</p>
|
||||
<p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">recreate</span></code> the container will be recreated.</p>
|
||||
<p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">ignore</span></code> the container will not be recreated because of this. It might still get recreated for other reasons. This has been the default behavior of the module for a long time, but might not be what users expect.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"recreate"</span></code></p></li>
|
||||
@@ -835,7 +835,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-init" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Run an init inside the container that forwards signals and reaps processes.</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -848,7 +848,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-interactive" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Keep stdin open after a container is launched, even if not attached.</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -861,7 +861,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-ipc_mode" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Set the IPC mode for the container.</p>
|
||||
<p>Can be one of <code class="docutils literal notranslate"><span class="pre">container:<name|id></span></code> to reuse another container’s IPC namespace or <code class="docutils literal notranslate"><span class="pre">host</span></code> to use the host’s IPC namespace within the container.</p>
|
||||
<p>Can be one of <code class="ansible-value docutils literal notranslate"><span class="pre">container:<name|id></span></code> to reuse another container’s IPC namespace or <code class="ansible-value docutils literal notranslate"><span class="pre">host</span></code> to use the host’s IPC namespace within the container.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -880,7 +880,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-kernel_memory"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-kernel-memory"><strong>kernel_memory</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-kernel_memory" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Kernel memory limit in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>. Number is a positive integer. Unit can be <code class="docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="docutils literal notranslate"><span class="pre">P</span></code> (pebibyte). Minimum is <code class="docutils literal notranslate"><span class="pre">4M</span></code>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Kernel memory limit in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>. Number is a positive integer. Unit can be <code class="ansible-value docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="ansible-value docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="ansible-value docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="ansible-value docutils literal notranslate"><span class="pre">P</span></code> (pebibyte). Minimum is <code class="ansible-value docutils literal notranslate"><span class="pre">4M</span></code>.</p>
|
||||
<p>Omitting the unit defaults to bytes.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -910,8 +910,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-log_driver"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-log-driver"><strong>log_driver</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-log_driver" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Specify the logging driver. Docker uses <code class="docutils literal notranslate"><span class="pre">json-file</span></code> by default.</p>
|
||||
<p>See <a class="reference external" href="https://docs.docker.com/config/containers/logging/configure/">here</a> for possible choices.</p>
|
||||
<td><div class="ansible-option-cell"><p>Specify the logging driver. Docker uses <code class="ansible-value docutils literal notranslate"><span class="pre">json-file</span></code> by default.</p>
|
||||
<p>See <a class="reference external" href="https://docs.docker.com/config/containers/logging/configure/">the Docker logging configuration documentation</a> for possible choices.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -920,32 +920,32 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-log_options" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: log_opt</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Dictionary of options specific to the chosen <em>log_driver</em>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Dictionary of options specific to the chosen <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-log-driver"><span class="std std-ref"><span class="pre">log_driver</span></span></a></strong></code>.</p>
|
||||
<p>See <a class="reference external" href="https://docs.docker.com/engine/admin/logging/overview/">https://docs.docker.com/engine/admin/logging/overview/</a> for details.</p>
|
||||
<p><em>log_driver</em> needs to be specified for <em>log_options</em> to take effect, even if using the default <code class="docutils literal notranslate"><span class="pre">json-file</span></code> driver.</p>
|
||||
<p><code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-log-driver"><span class="std std-ref"><span class="pre">log_driver</span></span></a></strong></code> needs to be specified for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-log-options"><span class="std std-ref"><span class="pre">log_options</span></span></a></strong></code> to take effect, even if using the default <code class="ansible-value docutils literal notranslate"><span class="pre">json-file</span></code> driver.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-mac_address"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-mac-address"><strong>mac_address</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-mac_address" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Container MAC address (for example, <code class="docutils literal notranslate"><span class="pre">92:d0:c6:0a:29:33</span></code>).</p>
|
||||
<td><div class="ansible-option-cell"><p>Container MAC address (for example, <code class="ansible-value docutils literal notranslate"><span class="pre">92:d0:c6:0a:29:33</span></code>).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-memory"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-memory"><strong>memory</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-memory" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Memory limit in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>. Number is a positive integer. Unit can be <code class="docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<td><div class="ansible-option-cell"><p>Memory limit in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>. Number is a positive integer. Unit can be <code class="ansible-value docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="ansible-value docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="ansible-value docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="ansible-value docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Omitting the unit defaults to bytes.</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">"0"</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">"0"</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-memory_reservation"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-memory-reservation"><strong>memory_reservation</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-memory_reservation" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Memory soft limit in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>. Number is a positive integer. Unit can be <code class="docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<td><div class="ansible-option-cell"><p>Memory soft limit in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>. Number is a positive integer. Unit can be <code class="ansible-value docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="ansible-value docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="ansible-value docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="ansible-value docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Omitting the unit defaults to bytes.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -953,7 +953,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-memory_swap"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-memory-swap"><strong>memory_swap</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-memory_swap" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Total memory limit (memory + swap) in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>, or the special values <code class="docutils literal notranslate"><span class="pre">unlimited</span></code> or <code class="docutils literal notranslate"><span class="pre">-1</span></code> for unlimited swap usage. Number is a positive integer. Unit can be <code class="docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<td><div class="ansible-option-cell"><p>Total memory limit (memory + swap) in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>, or the special values <code class="ansible-value docutils literal notranslate"><span class="pre">unlimited</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">-1</span></code> for unlimited swap usage. Number is a positive integer. Unit can be <code class="ansible-value docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="ansible-value docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="ansible-value docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="ansible-value docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Omitting the unit defaults to bytes.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -969,7 +969,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-mounts"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-mounts"><strong>mounts</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-mounts" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Specification for mounts to be added to the container. More powerful alternative to <em>volumes</em>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Specification for mounts to be added to the container. More powerful alternative to <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-volumes"><span class="std std-ref"><span class="pre">volumes</span></span></a></strong></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -990,15 +990,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-mounts/labels"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-mounts-labels"><strong>labels</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-mounts/labels" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>User-defined name and labels for the volume. Only valid for the <code class="docutils literal notranslate"><span class="pre">volume</span></code> type.</p>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>User-defined name and labels for the volume. Only valid for the <code class="ansible-value docutils literal notranslate"><span class="pre">volume</span></code> type.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-mounts/no_copy"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-mounts-no-copy"><strong>no_copy</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-mounts/no_copy" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>False if the volume should be populated with the data from the target. Only valid for the <code class="docutils literal notranslate"><span class="pre">volume</span></code> type.</p>
|
||||
<p>The default value is <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>False if the volume should be populated with the data from the target. Only valid for the <code class="ansible-value docutils literal notranslate"><span class="pre">volume</span></code> type.</p>
|
||||
<p>The default value is <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -1010,7 +1010,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-mounts/propagation"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-mounts-propagation"><strong>propagation</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-mounts/propagation" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Propagation mode. Only valid for the <code class="docutils literal notranslate"><span class="pre">bind</span></code> type.</p>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Propagation mode. Only valid for the <code class="ansible-value docutils literal notranslate"><span class="pre">bind</span></code> type.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"private"</span></code></p></li>
|
||||
@@ -1040,7 +1040,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Mount source.</p>
|
||||
<p>For example, this can be a volume name or a host path.</p>
|
||||
<p>If not supplied when <em>type=volume</em> an anonymous volume will be created.</p>
|
||||
<p>If not supplied when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-mounts-type"><span class="std std-ref"><span class="pre">mounts[].type=volume</span></span></a></code> an anonymous volume will be created.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -1062,7 +1062,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-mounts/tmpfs_size" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The size for the tmpfs mount in bytes in format <number>[<unit>].</p>
|
||||
<p>Number is a positive integer. Unit can be one of <code class="docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Number is a positive integer. Unit can be one of <code class="ansible-value docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="ansible-value docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="ansible-value docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="ansible-value docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Omitting the unit defaults to bytes.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -1071,7 +1071,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-mounts/type" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The mount type.</p>
|
||||
<p>Note that <code class="docutils literal notranslate"><span class="pre">npipe</span></code> is only supported by Docker for Windows.</p>
|
||||
<p>Note that <code class="ansible-value docutils literal notranslate"><span class="pre">npipe</span></code> is only supported by Docker for Windows.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"bind"</span></code></p></li>
|
||||
@@ -1085,7 +1085,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-mounts/volume_driver"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-mounts-volume-driver"><strong>volume_driver</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-mounts/volume_driver" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Specify the volume driver. Only valid for the <code class="docutils literal notranslate"><span class="pre">volume</span></code> type.</p>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Specify the volume driver. Only valid for the <code class="ansible-value docutils literal notranslate"><span class="pre">volume</span></code> type.</p>
|
||||
<p>See <a class="reference external" href="https://docs.docker.com/storage/volumes/#use-a-volume-driver">here</a> for details.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -1108,8 +1108,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-network_mode"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-network-mode"><strong>network_mode</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-network_mode" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Connect the container to a network. Choices are <code class="docutils literal notranslate"><span class="pre">bridge</span></code>, <code class="docutils literal notranslate"><span class="pre">host</span></code>, <code class="docutils literal notranslate"><span class="pre">none</span></code>, <code class="docutils literal notranslate"><span class="pre">container:<name|id></span></code>, <code class="docutils literal notranslate"><span class="pre"><network_name></span></code> or <code class="docutils literal notranslate"><span class="pre">default</span></code>.</p>
|
||||
<p>Since community.docker 2.0.0, if <em>networks_cli_compatible</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code> and <em>networks</em> contains at least one network, the default value for <em>network_mode</em> is the name of the first network in the <em>networks</em> list. You can prevent this by explicitly specifying a value for <em>network_mode</em>, like the default value <code class="docutils literal notranslate"><span class="pre">default</span></code> which will be used by Docker if <em>network_mode</em> is not specified.</p>
|
||||
<td><div class="ansible-option-cell"><p>Connect the container to a network. Choices are <code class="ansible-value docutils literal notranslate"><span class="pre">bridge</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">host</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">none</span></code>, <code class="docutils literal notranslate"><span class="pre">container:<name|id></span></code>, <code class="docutils literal notranslate"><span class="pre"><network_name></span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">default</span></code>.</p>
|
||||
<p>Since community.docker 2.0.0, if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks-cli-compatible"><span class="std std-ref"><span class="pre">networks_cli_compatible=true</span></span></a></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> contains at least one network, the default value for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-network-mode"><span class="std std-ref"><span class="pre">network_mode</span></span></a></strong></code> is the name of the first network in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> list. You can prevent this by explicitly specifying a value for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-network-mode"><span class="std std-ref"><span class="pre">network_mode</span></span></a></strong></code>, like the default value <code class="ansible-value docutils literal notranslate"><span class="pre">default</span></code> which will be used by Docker if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-network-mode"><span class="std std-ref"><span class="pre">network_mode</span></span></a></strong></code> is not specified.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -1118,8 +1118,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of networks the container belongs to.</p>
|
||||
<p>For examples of the data structure and usage see EXAMPLES below.</p>
|
||||
<p>To remove a container from one or more networks, use <code class="docutils literal notranslate"><span class="pre">networks:</span> <span class="pre">strict</span></code> in the <em>comparisons</em> option.</p>
|
||||
<p>If <em>networks_cli_compatible</em> is set to <code class="docutils literal notranslate"><span class="pre">false</span></code>, this will not remove the default network if <em>networks</em> is specified. This is different from the behavior of <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">...</span></code>. You need to explicitly use <code class="docutils literal notranslate"><span class="pre">networks:</span> <span class="pre">strict</span></code> in <em>comparisons</em> to enforce the removal of the default network (and all other networks not explicitly mentioned in <em>networks</em>) in that case.</p>
|
||||
<p>To remove a container from one or more networks, use <code class="docutils literal notranslate"><span class="pre">networks:</span> <span class="pre">strict</span></code> in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> option.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks-cli-compatible"><span class="std std-ref"><span class="pre">networks_cli_compatible=false</span></span></a></code>, this will not remove the default network if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> is specified. This is different from the behavior of <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">...</span></code>. You need to explicitly use <code class="docutils literal notranslate"><span class="pre">networks:</span> <span class="pre">strict</span></code> in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> to enforce the removal of the default network (and all other networks not explicitly mentioned in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code>) in that case.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -1161,8 +1161,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-networks_cli_compatible"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-networks-cli-compatible"><strong>networks_cli_compatible</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-networks_cli_compatible" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If <em>networks_cli_compatible</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> (default), this module will behave as <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">--network</span></code> and will <strong>not</strong> add the default network if <em>networks</em> is specified. If <em>networks</em> is not specified, the default network will be attached.</p>
|
||||
<p>When <em>networks_cli_compatible</em> is set to <code class="docutils literal notranslate"><span class="pre">false</span></code> and networks are provided to the module via the <em>networks</em> option, the module behaves differently than <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">--network</span></code>: <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">--network</span> <span class="pre">other</span></code> will create a container with network <code class="docutils literal notranslate"><span class="pre">other</span></code> attached, but the default network not attached. This module with <em>networks: {name: other}</em> will create a container with both <code class="docutils literal notranslate"><span class="pre">default</span></code> and <code class="docutils literal notranslate"><span class="pre">other</span></code> attached. If <code class="docutils literal notranslate"><span class="pre">networks:</span> <span class="pre">strict</span></code> or <code class="docutils literal notranslate"><span class="pre">*:</span> <span class="pre">strict</span></code> is set in <em>comparisons</em>, the <code class="docutils literal notranslate"><span class="pre">default</span></code> network will be removed afterwards.</p>
|
||||
<td><div class="ansible-option-cell"><p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks-cli-compatible"><span class="std std-ref"><span class="pre">networks_cli_compatible=true</span></span></a></code> (default), this module will behave as <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">--network</span></code> and will <strong>not</strong> add the default network if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> is specified. If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> is not specified, the default network will be attached.</p>
|
||||
<p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks-cli-compatible"><span class="std std-ref"><span class="pre">networks_cli_compatible=false</span></span></a></code> and networks are provided to the module via the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> option, the module behaves differently than <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">--network</span></code>: <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">--network</span> <span class="pre">other</span></code> will create a container with network <code class="docutils literal notranslate"><span class="pre">other</span></code> attached, but the default network not attached. This module with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> set to <code class="docutils literal notranslate"><span class="pre">{name:</span> <span class="pre">other}</span></code> will create a container with both <code class="docutils literal notranslate"><span class="pre">default</span></code> and <code class="docutils literal notranslate"><span class="pre">other</span></code> attached. If <code class="docutils literal notranslate"><span class="pre">networks:</span> <span class="pre">strict</span></code> or <code class="docutils literal notranslate"><span class="pre">*:</span> <span class="pre">strict</span></code> is set in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code>, the <code class="docutils literal notranslate"><span class="pre">default</span></code> network will be removed afterwards.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -1194,7 +1194,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-output_logs" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set to true, output of the container command will be printed.</p>
|
||||
<p>Only effective when <em>log_driver</em> is set to <code class="docutils literal notranslate"><span class="pre">json-file</span></code>, <code class="docutils literal notranslate"><span class="pre">journald</span></code>, or <code class="docutils literal notranslate"><span class="pre">local</span></code>.</p>
|
||||
<p>Only effective when <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-log-driver"><span class="std std-ref"><span class="pre">log_driver</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">json-file</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">journald</span></code>, or <code class="ansible-value docutils literal notranslate"><span class="pre">local</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -1207,7 +1207,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-paused" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with the started state to pause running processes inside the container.</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -1227,7 +1227,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-pids_limit" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Set PIDs limit for the container. It accepts an integer value.</p>
|
||||
<p>Set <code class="docutils literal notranslate"><span class="pre">-1</span></code> for unlimited PIDs.</p>
|
||||
<p>Set <code class="ansible-value docutils literal notranslate"><span class="pre">-1</span></code> for unlimited PIDs.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -1236,7 +1236,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 3.0.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Platform for the container in the format <code class="docutils literal notranslate"><span class="pre">os[/arch[/variant]]</span></code>.</p>
|
||||
<p>Please note that inspecting the container does not always return the exact platform string used to create the container. This can cause idempotency to break for this module. Use the <em>comparisons</em> option with <code class="docutils literal notranslate"><span class="pre">platform:</span> <span class="pre">ignore</span></code> to prevent accidental recreation of the container due to this.</p>
|
||||
<p>Please note that inspecting the container does not always return the exact platform string used to create the container. This can cause idempotency to break for this module. Use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> option with <code class="docutils literal notranslate"><span class="pre">platform:</span> <span class="pre">ignore</span></code> to prevent accidental recreation of the container due to this.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -1244,7 +1244,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-privileged" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Give extended privileges to the container.</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -1258,7 +1258,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 1.8.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Publish all ports to the host.</p>
|
||||
<p>Any specified port bindings from <em>published_ports</em> will remain intact when <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p>Any specified port bindings from <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-published-ports"><span class="std std-ref"><span class="pre">published_ports</span></span></a></strong></code> will remain intact when <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -1273,11 +1273,11 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of ports to publish from the container to the host.</p>
|
||||
<p>Use docker CLI syntax: <code class="docutils literal notranslate"><span class="pre">8000</span></code>, <code class="docutils literal notranslate"><span class="pre">9000:8000</span></code>, or <code class="docutils literal notranslate"><span class="pre">0.0.0.0:9000:8000</span></code>, where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is a host interface.</p>
|
||||
<p>Use docker CLI syntax: <code class="ansible-value docutils literal notranslate"><span class="pre">8000</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">9000:8000</span></code>, or <code class="ansible-value docutils literal notranslate"><span class="pre">0.0.0.0:9000:8000</span></code>, where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is a host interface.</p>
|
||||
<p>Port ranges can be used for source and destination ports. If two ranges with different lengths are specified, the shorter range will be used. Since community.general 0.2.0, if the source port range has length 1, the port will not be assigned to the first port of the destination range, but to a free port in that range. This is the same behavior as for <code class="docutils literal notranslate"><span class="pre">docker</span></code> command line utility.</p>
|
||||
<p>Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are <strong>not</strong> allowed. This is different from the <code class="docutils literal notranslate"><span class="pre">docker</span></code> command line utility. Use the <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/community/general/dig_lookup.html#ansible-collections-community-general-dig-lookup" title="(in Ansible vdevel)"><span class="xref std std-ref">dig lookup</span></a> to resolve hostnames.</p>
|
||||
<p>If <em>networks</em> parameter is provided, will inspect each network to see if there exists a bridge network with optional parameter <code class="docutils literal notranslate"><span class="pre">com.docker.network.bridge.host_binding_ipv4</span></code>. If such a network is found, then published ports where no host IP address is specified will be bound to the host IP pointed to by <code class="docutils literal notranslate"><span class="pre">com.docker.network.bridge.host_binding_ipv4</span></code>. Note that the first bridge network with a <code class="docutils literal notranslate"><span class="pre">com.docker.network.bridge.host_binding_ipv4</span></code> value encountered in the list of <em>networks</em> is the one that will be used.</p>
|
||||
<p>The value <code class="docutils literal notranslate"><span class="pre">all</span></code> was allowed in earlier versions of this module. Support for it was removed in community.docker 3.0.0. Use the <em>publish_all_ports</em> option instead.</p>
|
||||
<p>Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are <strong>not</strong> allowed. This is different from the <code class="docutils literal notranslate"><span class="pre">docker</span></code> command line utility. Use the <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/community/general/dig_lookup.html#ansible-collections-community-general-dig-lookup" title="(in Ansible vdevel)"><span class="xref std std-ref">community.general.dig</span></a> lookup to resolve hostnames.</p>
|
||||
<p>If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> parameter is provided, will inspect each network to see if there exists a bridge network with optional parameter <code class="docutils literal notranslate"><span class="pre">com.docker.network.bridge.host_binding_ipv4</span></code>. If such a network is found, then published ports where no host IP address is specified will be bound to the host IP pointed to by <code class="docutils literal notranslate"><span class="pre">com.docker.network.bridge.host_binding_ipv4</span></code>. Note that the first bridge network with a <code class="docutils literal notranslate"><span class="pre">com.docker.network.bridge.host_binding_ipv4</span></code> value encountered in the list of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> is the one that will be used.</p>
|
||||
<p>The value <code class="ansible-value docutils literal notranslate"><span class="pre">all</span></code> was allowed in earlier versions of this module. Support for it was removed in community.docker 3.0.0. Use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-publish-all-ports"><span class="std std-ref"><span class="pre">publish_all_ports</span></span></a></strong></code> option instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -1297,9 +1297,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-purge_networks"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-purge-networks"><strong>purge_networks</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-purge_networks" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Remove the container from ALL networks not included in <em>networks</em> parameter.</p>
|
||||
<p>Any default networks such as <code class="docutils literal notranslate"><span class="pre">bridge</span></code>, if not found in <em>networks</em>, will be removed as well.</p>
|
||||
<p>This option is deprecated since community.docker 3.2.0 and will be removed in community.docker 4.0.0. Use <code class="docutils literal notranslate"><span class="pre">networks:</span> <span class="pre">strict</span></code> in <em>comparisons</em> instead of <em>purge_networks=true</em> and make sure that <em>networks</em> is specified. If you want to remove all networks, specify <em>networks: []</em>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Remove the container from ALL networks not included in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> parameter.</p>
|
||||
<p>Any default networks such as <code class="docutils literal notranslate"><span class="pre">bridge</span></code>, if not found in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code>, will be removed as well.</p>
|
||||
<p>This option is deprecated since community.docker 3.2.0 and will be removed in community.docker 4.0.0. Use <code class="docutils literal notranslate"><span class="pre">networks:</span> <span class="pre">strict</span></code> in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> instead of <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-purge-networks"><span class="std std-ref"><span class="pre">purge_networks=true</span></span></a></code> and make sure that <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> is specified. If you want to remove all networks, specify <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code> as <code class="docutils literal notranslate"><span class="pre">[]</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -1312,7 +1312,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-read_only" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Mount the container’s root file system as read-only.</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -1357,7 +1357,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-restart_policy" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Container restart policy.</p>
|
||||
<p>Place quotes around <code class="docutils literal notranslate"><span class="pre">no</span></code> option.</p>
|
||||
<p>Place quotes around <code class="ansible-value docutils literal notranslate"><span class="pre">no</span></code> option.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"no"</span></code></p></li>
|
||||
@@ -1392,30 +1392,30 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-shm_size"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-shm-size"><strong>shm_size</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-shm_size" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Size of <code class="docutils literal notranslate"><span class="pre">/dev/shm</span></code> in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>. Number is positive integer. Unit can be <code class="docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Omitting the unit defaults to bytes. If you omit the size entirely, Docker daemon uses <code class="docutils literal notranslate"><span class="pre">64M</span></code>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Size of <code class="docutils literal notranslate"><span class="pre">/dev/shm</span></code> in format <code class="docutils literal notranslate"><span class="pre"><number>[<unit>]</span></code>. Number is positive integer. Unit can be <code class="ansible-value docutils literal notranslate"><span class="pre">B</span></code> (byte), <code class="ansible-value docutils literal notranslate"><span class="pre">K</span></code> (kibibyte, 1024B), <code class="ansible-value docutils literal notranslate"><span class="pre">M</span></code> (mebibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">G</span></code> (gibibyte), <code class="ansible-value docutils literal notranslate"><span class="pre">T</span></code> (tebibyte), or <code class="ansible-value docutils literal notranslate"><span class="pre">P</span></code> (pebibyte).</p>
|
||||
<p>Omitting the unit defaults to bytes. If you omit the size entirely, Docker daemon uses <code class="ansible-value docutils literal notranslate"><span class="pre">64M</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-state"><strong>state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p><code class="docutils literal notranslate"><span class="pre">absent</span></code> - A container matching the specified name will be stopped and removed. Use <em>force_kill</em> to kill the container rather than stopping it. Use <em>keep_volumes</em> to retain anonymous volumes associated with the removed container.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">present</span></code> - Asserts the existence of a container matching the name and any provided configuration parameters. If no container matches the name, a container will be created. If a container matches the name but the provided configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created with the requested config.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">started</span></code> - Asserts that the container is first <code class="docutils literal notranslate"><span class="pre">present</span></code>, and then if the container is not running moves it to a running state. Use <em>restart</em> to force a matching container to be stopped and restarted.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">stopped</span></code> - Asserts that the container is first <code class="docutils literal notranslate"><span class="pre">present</span></code>, and then if the container is running moves it to a stopped state.</p>
|
||||
<p>To control what will be taken into account when comparing configuration, see the <em>comparisons</em> option. To avoid that the image version will be taken into account, you can also use the <code class="docutils literal notranslate"><span class="pre">image:</span> <span class="pre">ignore</span></code> in the <em>comparisons</em> option.</p>
|
||||
<p>Use the <em>recreate</em> option to always force re-creation of a matching container, even if it is running.</p>
|
||||
<p>If the container should be killed instead of stopped in case it needs to be stopped for recreation, or because <em>state</em> is <code class="docutils literal notranslate"><span class="pre">stopped</span></code>, please use the <em>force_kill</em> option. Use <em>keep_volumes</em> to retain anonymous volumes associated with a removed container.</p>
|
||||
<p>Use <em>keep_volumes</em> to retain anonymous volumes associated with a removed container.</p>
|
||||
<td><div class="ansible-option-cell"><p><code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> - A container matching the specified name will be stopped and removed. Use <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-force-kill"><span class="std std-ref"><span class="pre">force_kill</span></span></a></strong></code> to kill the container rather than stopping it. Use <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-keep-volumes"><span class="std std-ref"><span class="pre">keep_volumes</span></span></a></strong></code> to retain anonymous volumes associated with the removed container.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> - Asserts the existence of a container matching the name and any provided configuration parameters. If no container matches the name, a container will be created. If a container matches the name but the provided configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created with the requested config.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">started</span></code> - Asserts that the container is first <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code>, and then if the container is not running moves it to a running state. Use <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-restart"><span class="std std-ref"><span class="pre">restart</span></span></a></strong></code> to force a matching container to be stopped and restarted.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">stopped</span></code> - Asserts that the container is first <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code>, and then if the container is running moves it to a stopped state.</p>
|
||||
<p>To control what will be taken into account when comparing configuration, see the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> option. To avoid that the image version will be taken into account, you can also use the <code class="ansible-value docutils literal notranslate"><span class="pre">image:</span> <span class="pre">ignore</span></code> in the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> option.</p>
|
||||
<p>Use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-recreate"><span class="std std-ref"><span class="pre">recreate</span></span></a></strong></code> option to always force re-creation of a matching container, even if it is running.</p>
|
||||
<p>If the container should be killed instead of stopped in case it needs to be stopped for recreation, or because <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-state"><span class="std std-ref"><span class="pre">state</span></span></a></strong></code> is <code class="ansible-value docutils literal notranslate"><span class="pre">stopped</span></code>, please use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-force-kill"><span class="std std-ref"><span class="pre">force_kill</span></span></a></strong></code> option. Use <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-keep-volumes"><span class="std std-ref"><span class="pre">keep_volumes</span></span></a></strong></code> to retain anonymous volumes associated with a removed container.</p>
|
||||
<p>Use <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-keep-volumes"><span class="std std-ref"><span class="pre">keep_volumes</span></span></a></strong></code> to retain anonymous volumes associated with a removed container.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"absent"</span></code></p></li>
|
||||
@@ -1460,7 +1460,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -1468,8 +1468,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -1482,8 +1482,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -1498,7 +1498,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tty" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Allocate a pseudo-TTY.</p>
|
||||
<p>If <em>container_default_behavior</em> is set to <code class="docutils literal notranslate"><span class="pre">compatibility</span></code>, this option has a default of <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-container-default-behavior"><span class="std std-ref"><span class="pre">container_default_behavior=compatibility</span></span></a></code>, this option has a default of <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -1510,7 +1510,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ulimits"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-ulimits"><strong>ulimits</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ulimits" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of ulimit options. A ulimit is specified as <code class="docutils literal notranslate"><span class="pre">nofile:262144:262144</span></code>.</p>
|
||||
<td><div class="ansible-option-cell"><p>List of ulimit options. A ulimit is specified as <code class="ansible-value docutils literal notranslate"><span class="pre">nofile:262144:262144</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -1538,7 +1538,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-userns_mode"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-container-module-parameter-userns-mode"><strong>userns_mode</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-userns_mode" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Set the user namespace mode for the container. Currently, the only valid value are <code class="docutils literal notranslate"><span class="pre">host</span></code> and the empty string.</p>
|
||||
<td><div class="ansible-option-cell"><p>Set the user namespace mode for the container. Currently, the only valid value are <code class="ansible-value docutils literal notranslate"><span class="pre">host</span></code> and the empty string (<code class="ansible-value docutils literal notranslate"><span class="pre">""</span></code>).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -1555,7 +1555,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -1576,9 +1576,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of volumes to mount within the container.</p>
|
||||
<p>Use docker CLI-style syntax: <code class="docutils literal notranslate"><span class="pre">/host:/container[:mode]</span></code></p>
|
||||
<p>Mount modes can be a comma-separated list of various modes such as <code class="docutils literal notranslate"><span class="pre">ro</span></code>, <code class="docutils literal notranslate"><span class="pre">rw</span></code>, <code class="docutils literal notranslate"><span class="pre">consistent</span></code>, <code class="docutils literal notranslate"><span class="pre">delegated</span></code>, <code class="docutils literal notranslate"><span class="pre">cached</span></code>, <code class="docutils literal notranslate"><span class="pre">rprivate</span></code>, <code class="docutils literal notranslate"><span class="pre">private</span></code>, <code class="docutils literal notranslate"><span class="pre">rshared</span></code>, <code class="docutils literal notranslate"><span class="pre">shared</span></code>, <code class="docutils literal notranslate"><span class="pre">rslave</span></code>, <code class="docutils literal notranslate"><span class="pre">slave</span></code>, and <code class="docutils literal notranslate"><span class="pre">nocopy</span></code>. Note that the docker daemon might not support all modes and combinations of such modes.</p>
|
||||
<p>SELinux hosts can additionally use <code class="docutils literal notranslate"><span class="pre">z</span></code> or <code class="docutils literal notranslate"><span class="pre">Z</span></code> to use a shared or private label for the volume.</p>
|
||||
<p>Note that Ansible 2.7 and earlier only supported one mode, which had to be one of <code class="docutils literal notranslate"><span class="pre">ro</span></code>, <code class="docutils literal notranslate"><span class="pre">rw</span></code>, <code class="docutils literal notranslate"><span class="pre">z</span></code>, and <code class="docutils literal notranslate"><span class="pre">Z</span></code>.</p>
|
||||
<p>Mount modes can be a comma-separated list of various modes such as <code class="ansible-value docutils literal notranslate"><span class="pre">ro</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">rw</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">consistent</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">delegated</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">cached</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">rprivate</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">private</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">rshared</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">shared</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">rslave</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">slave</span></code>, and <code class="ansible-value docutils literal notranslate"><span class="pre">nocopy</span></code>. Note that the docker daemon might not support all modes and combinations of such modes.</p>
|
||||
<p>SELinux hosts can additionally use <code class="ansible-value docutils literal notranslate"><span class="pre">z</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">Z</span></code> to use a shared or private label for the volume.</p>
|
||||
<p>Note that Ansible 2.7 and earlier only supported one mode, which had to be one of <code class="ansible-value docutils literal notranslate"><span class="pre">ro</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">rw</span></code>, <code class="ansible-value docutils literal notranslate"><span class="pre">z</span></code>, and <code class="ansible-value docutils literal notranslate"><span class="pre">Z</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -1641,10 +1641,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>For most config changes, the container needs to be recreated. This means that the existing container has to be destroyed and a new one created. This can cause unexpected data loss and downtime. You can use the <em>comparisons</em> option to prevent this.</p></li>
|
||||
<li><p>If the module needs to recreate the container, it will only use the options provided to the module to create the new container (except <em>image</em>). Therefore, always specify <strong>all</strong> options relevant to the container.</p></li>
|
||||
<li><p>When <em>restart</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, the module will only restart the container if no config changes are detected.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>For most config changes, the container needs to be recreated. This means that the existing container has to be destroyed and a new one created. This can cause unexpected data loss and downtime. You can use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-comparisons"><span class="std std-ref"><span class="pre">comparisons</span></span></a></strong></code> option to prevent this.</p></li>
|
||||
<li><p>If the module needs to recreate the container, it will only use the options provided to the module to create the new container (except <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-image"><span class="std std-ref"><span class="pre">image</span></span></a></strong></code>). Therefore, always specify <strong>all</strong> options relevant to the container.</p></li>
|
||||
<li><p>When <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-restart"><span class="std std-ref"><span class="pre">restart</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, the module will only restart the container if no config changes are detected.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1930,9 +1930,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-container" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Facts representing the current state of the container. Matches the docker inspection output.</p>
|
||||
<p>Empty if <em>state</em> is <code class="docutils literal notranslate"><span class="pre">absent</span></code>.</p>
|
||||
<p>If <em>detach=false</em>, will include <code class="docutils literal notranslate"><span class="pre">Output</span></code> attribute containing any output from container run.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success; or when <em>state=started</em> and <em>detach=false</em>, and when waiting for the container result did not fail</p>
|
||||
<p>Empty if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code>, will include <code class="docutils literal notranslate"><span class="pre">Output</span></code> attribute containing any output from container run.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success; or when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-state"><span class="std std-ref"><span class="pre">state=started</span></span></a></code> and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code>, and when waiting for the container result did not fail</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"{</span> <span class="pre">\"AppArmorProfile\":</span> <span class="pre">\"\",</span> <span class="pre">\"Args\":</span> <span class="pre">[],</span> <span class="pre">\"Config\":</span> <span class="pre">{</span> <span class="pre">\"AttachStderr\":</span> <span class="pre">false,</span> <span class="pre">\"AttachStdin\":</span> <span class="pre">false,</span> <span class="pre">\"AttachStdout\":</span> <span class="pre">false,</span> <span class="pre">\"Cmd\":</span> <span class="pre">[</span> <span class="pre">\"/usr/bin/supervisord\"</span> <span class="pre">],</span> <span class="pre">\"Domainname\":</span> <span class="pre">\"\",</span> <span class="pre">\"Entrypoint\":</span> <span class="pre">null,</span> <span class="pre">\"Env\":</span> <span class="pre">[</span> <span class="pre">\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"</span> <span class="pre">],</span> <span class="pre">\"ExposedPorts\":</span> <span class="pre">{</span> <span class="pre">\"443/tcp\":</span> <span class="pre">{},</span> <span class="pre">\"80/tcp\":</span> <span class="pre">{}</span> <span class="pre">},</span> <span class="pre">\"Hostname\":</span> <span class="pre">\"8e47bf643eb9\",</span> <span class="pre">\"Image\":</span> <span class="pre">\"lnmp_nginx:v1\",</span> <span class="pre">\"Labels\":</span> <span class="pre">{},</span> <span class="pre">\"OnBuild\":</span> <span class="pre">null,</span> <span class="pre">\"OpenStdin\":</span> <span class="pre">false,</span> <span class="pre">\"StdinOnce\":</span> <span class="pre">false,</span> <span class="pre">\"Tty\":</span> <span class="pre">false,</span> <span class="pre">\"User\":</span> <span class="pre">\"\",</span> <span class="pre">\"Volumes\":</span> <span class="pre">{</span> <span class="pre">\"/tmp/lnmp/nginx-sites/logs/\":</span> <span class="pre">{}</span> <span class="pre">},</span> <span class="pre">...</span> <span class="pre">}"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -1942,7 +1942,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>In case a container is started without detaching, this contains the exit code of the process in the container.</p>
|
||||
<p>Before community.docker 1.1.0, this was only returned when non-zero.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> when <em>state=started</em> and <em>detach=false</em>, and when waiting for the container result did not fail</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-state"><span class="std std-ref"><span class="pre">state=started</span></span></a></code> and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-detach"><span class="std std-ref"><span class="pre">detach=false</span></span></a></code>, and when waiting for the container result did not fail</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">0</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -190,7 +190,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>requests</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
</ul>
|
||||
@@ -215,10 +215,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><code class="docutils literal notranslate"><span class="pre">image_<image</span> <span class="pre">name></span></code>: contains the containers that have the image <code class="docutils literal notranslate"><span class="pre"><image</span> <span class="pre">name></span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">stack_<stack</span> <span class="pre">name></span></code>: contains the containers that belong to the stack <code class="docutils literal notranslate"><span class="pre"><stack</span> <span class="pre">name></span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">service_<service</span> <span class="pre">name></span></code>: contains the containers that belong to the service <code class="docutils literal notranslate"><span class="pre"><service</span> <span class="pre">name></span></code></p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre"><docker_host></span></code>: contains the containers which belong to the Docker daemon <em>docker_host</em>. Useful if you run this plugin against multiple Docker daemons.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre"><docker_host></span></code>: contains the containers which belong to the Docker daemon <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-docker-host"><span class="std std-ref"><span class="pre">docker_host</span></span></a></strong></code>. Useful if you run this plugin against multiple Docker daemons.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">running</span></code>: contains all containers that are running.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">stopped</span></code>: contains all containers that are not running.</p>
|
||||
<p>If this is not set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, you should use keyed groups to add the containers to groups. See the examples for how to do that.</p>
|
||||
<p>If this is not set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, you should use keyed groups to add the containers to groups. See the examples for how to do that.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -234,7 +234,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -246,7 +246,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -257,7 +257,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -268,7 +268,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -285,7 +285,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 1.8.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Whether to pass all Docker daemon configuration from the inventory plugin to the connection plugin.</p>
|
||||
<p>Only used when <em>connection_type=docker-api</em>.</p>
|
||||
<p>Only used when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-connection-type"><span class="std std-ref"><span class="pre">connection_type=docker-api</span></span></a></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -298,10 +298,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-connection_type" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Which connection type to use the containers.</p>
|
||||
<p>One way to connect to containers is to use SSH (<code class="docutils literal notranslate"><span class="pre">ssh</span></code>). For this, the options <em>default_ip</em> and <em>private_ssh_port</em> are used. This requires that a SSH daemon is running inside the containers.</p>
|
||||
<p>Alternatively, <code class="docutils literal notranslate"><span class="pre">docker-cli</span></code> selects the <a class="reference internal" href="docker_connection.html#ansible-collections-community-docker-docker-connection"><span class="std std-ref">docker connection plugin</span></a>, and <code class="docutils literal notranslate"><span class="pre">docker-api</span></code> (default) selects the <a class="reference internal" href="docker_api_connection.html#ansible-collections-community-docker-docker-api-connection"><span class="std std-ref">docker_api connection plugin</span></a>.</p>
|
||||
<p>When <code class="docutils literal notranslate"><span class="pre">docker-api</span></code> is used, all Docker daemon configuration values are passed from the inventory plugin to the connection plugin. This can be controlled with <em>configure_docker_daemon</em>.</p>
|
||||
<p>Note that the <a class="reference internal" href="docker_api_connection.html#ansible-collections-community-docker-docker-api-connection"><span class="std std-ref">docker_api connection plugin</span></a> does <strong>not work with TCP TLS sockets</strong>! See <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/605">https://github.com/ansible-collections/community.docker/issues/605</a> for more information.</p>
|
||||
<p>One way to connect to containers is to use SSH (<code class="ansible-value docutils literal notranslate"><span class="pre">ssh</span></code>). For this, the options <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-default-ip"><span class="std std-ref"><span class="pre">default_ip</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-private-ssh-port"><span class="std std-ref"><span class="pre">private_ssh_port</span></span></a></strong></code> are used. This requires that a SSH daemon is running inside the containers.</p>
|
||||
<p>Alternatively, <code class="ansible-value docutils literal notranslate"><span class="pre">docker-cli</span></code> selects the <a class="reference internal" href="docker_connection.html#ansible-collections-community-docker-docker-connection"><span class="std std-ref">community.docker.docker</span></a> connection plugin, and <code class="ansible-value docutils literal notranslate"><span class="pre">docker-api</span></code> (default) selects the <a class="reference internal" href="docker_api_connection.html#ansible-collections-community-docker-docker-api-connection"><span class="std std-ref">community.docker.docker_api</span></a> connection plugin.</p>
|
||||
<p>When <code class="ansible-value docutils literal notranslate"><span class="pre">docker-api</span></code> is used, all Docker daemon configuration values are passed from the inventory plugin to the connection plugin. This can be controlled with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-configure-docker-daemon"><span class="std std-ref"><span class="pre">configure_docker_daemon</span></span></a></strong></code>.</p>
|
||||
<p>Note that the <a class="reference internal" href="docker_api_connection.html#ansible-collections-community-docker-docker-api-connection"><span class="std std-ref">community.docker.docker_api</span></a> does <strong>not work with TCP TLS sockets</strong>! See <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/605">https://github.com/ansible-collections/community.docker/issues/605</a> for more information.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"ssh"</span></code></p></li>
|
||||
@@ -327,7 +327,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-default_ip" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The IP address to assign to ansible_host when the container’s SSH port is mapped to interface ‘0.0.0.0’.</p>
|
||||
<p>Only used if <em>connection_type</em> is <code class="docutils literal notranslate"><span class="pre">ssh</span></code>.</p>
|
||||
<p>Only used if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-connection-type"><span class="std std-ref"><span class="pre">connection_type</span></span></a></strong></code> is <code class="ansible-value docutils literal notranslate"><span class="pre">ssh</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"127.0.0.1"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -337,8 +337,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -433,7 +433,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-plugin"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-containers-inventory-parameter-plugin"><strong>plugin</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-plugin" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The name of this plugin, it should always be set to <code class="docutils literal notranslate"><span class="pre">community.docker.docker_containers</span></code> for this plugin to recognize it as it’s own.</p>
|
||||
<td><div class="ansible-option-cell"><p>The name of this plugin, it should always be set to <code class="ansible-value docutils literal notranslate"><span class="pre">community.docker.docker_containers</span></code> for this plugin to recognize it as it’s own.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"community.docker.docker_containers"</span></code></p></li>
|
||||
@@ -445,7 +445,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-private_ssh_port" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The port containers use for SSH.</p>
|
||||
<p>Only used if <em>connection_type</em> is <code class="docutils literal notranslate"><span class="pre">ssh</span></code>.</p>
|
||||
<p>Only used if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-connection-type"><span class="std std-ref"><span class="pre">connection_type</span></span></a></strong></code> is <code class="ansible-value docutils literal notranslate"><span class="pre">ssh</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">22</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -453,8 +453,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-containers-inventory-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -475,7 +475,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -483,8 +483,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-containers-inventory-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -497,8 +497,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -544,7 +544,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -558,8 +558,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Toggle to (not) include all available inspection metadata.</p>
|
||||
<p>Note that all top-level keys will be transformed to the format <code class="docutils literal notranslate"><span class="pre">docker_xxx</span></code>. For example, <code class="docutils literal notranslate"><span class="pre">HostConfig</span></code> is converted to <code class="docutils literal notranslate"><span class="pre">docker_hostconfig</span></code>.</p>
|
||||
<p>If this is <code class="docutils literal notranslate"><span class="pre">false</span></code>, these values can only be used during <em>constructed</em>, <em>groups</em>, and <em>keyed_groups</em>.</p>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">docker</span></code> inventory script always added these variables, so for compatibility set this to <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p>If this is <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>, these values can only be used during <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-compose"><span class="std std-ref"><span class="pre">compose</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-groups"><span class="std std-ref"><span class="pre">groups</span></span></a></strong></code>, and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-containers-inventory-parameter-keyed-groups"><span class="std std-ref"><span class="pre">keyed_groups</span></span></a></strong></code>.</p>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">docker</span></code> inventory script always added these variables, so for compatibility set this to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -575,7 +575,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -196,7 +196,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -219,7 +219,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -231,7 +231,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -242,7 +242,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -253,7 +253,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -323,8 +323,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -375,8 +375,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -384,7 +384,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -392,8 +392,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -406,8 +406,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -430,7 +430,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -442,8 +442,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-verbose_output"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><strong>verbose_output</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-verbose_output" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When set to <code class="docutils literal notranslate"><span class="pre">true</span></code> and <em>networks</em>, <em>volumes</em>, <em>images</em>, <em>containers</em> or <em>disk_usage</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> 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 <a class="reference external" href="https://docs.docker.com/engine/api/">https://docs.docker.com/engine/api/</a>.</p>
|
||||
<p>The verbose output in this module contains only subset of information returned by <em>_info</em> module for each type of the objects.</p>
|
||||
<td><div class="ansible-option-cell"><p>When set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-networks"><span class="std std-ref"><span class="pre">networks</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-volumes"><span class="std std-ref"><span class="pre">volumes</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-images"><span class="std std-ref"><span class="pre">images</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-containers"><span class="std std-ref"><span class="pre">containers</span></span></a></strong></code>, or <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-disk-usage"><span class="std std-ref"><span class="pre">disk_usage</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> 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 <a class="reference external" href="https://docs.docker.com/engine/api/">https://docs.docker.com/engine/api/</a>.</p>
|
||||
<p>The verbose output in this module contains only subset of information returned by this module for each type of the objects.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -519,7 +519,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -582,7 +582,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="return-can_talk_to_docker"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-return-can-talk-to-docker"><strong>can_talk_to_docker</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-can_talk_to_docker" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Will be <code class="docutils literal notranslate"><span class="pre">true</span></code> if the module can talk to the docker daemon.</p>
|
||||
<td><div class="ansible-option-cell"><p>Will be <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> if the module can talk to the docker daemon.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> both on success and on error</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -590,16 +590,16 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="return-containers"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-return-containers"><strong>containers</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-containers" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each container. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">container</span> <span class="pre">ls</span></code> output unless <em>verbose_output=true</em>. See description for <em>verbose_output</em>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>containers</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each container. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">container</span> <span class="pre">ls</span></code> output unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output=true</span></span></a></code>. See description for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-containers"><span class="std std-ref"><span class="pre">containers=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-disk_usage"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-return-disk-usage"><strong>disk_usage</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-disk_usage" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Information on summary disk usage by images, containers and volumes on docker host unless <em>verbose_output=true</em>. See description for <em>verbose_output</em>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>disk_usage</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<td><div class="ansible-option-cell"><p>Information on summary disk usage by images, containers and volumes on docker host unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output=true</span></span></a></code>. See description for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-disk-usage"><span class="std std-ref"><span class="pre">disk_usage=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -614,24 +614,24 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="return-images"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-return-images"><strong>images</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-images" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each image. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">image</span> <span class="pre">ls</span></code> output unless <em>verbose_output=true</em>. See description for <em>verbose_output</em>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>images</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each image. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">image</span> <span class="pre">ls</span></code> output unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output=true</span></span></a></code>. See description for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-images"><span class="std std-ref"><span class="pre">images=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-networks"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-return-networks"><strong>networks</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-networks" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each network. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">network</span> <span class="pre">ls</span></code> output unless <em>verbose_output=true</em>. See description for <em>verbose_output</em>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>networks</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each network. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">network</span> <span class="pre">ls</span></code> output unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output=true</span></span></a></code>. See description for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-networks"><span class="std std-ref"><span class="pre">networks=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-volumes"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-host-info-module-return-volumes"><strong>volumes</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-volumes" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each volume. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">volume</span> <span class="pre">ls</span></code> output unless <em>verbose_output=true</em>. See description for <em>verbose_output</em>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>volumes</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each volume. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">volume</span> <span class="pre">ls</span></code> output unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output=true</span></span></a></code>. See description for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-host-info-module-parameter-volumes"><span class="std std-ref"><span class="pre">volumes=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -185,7 +185,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Provide one or more image names, and the module will inspect each, returning an array of inspection results.</p></li>
|
||||
<li><p>If an image does not exist locally, it will not appear in the results. If you want to check whether an image exists locally, you can call the module with the image name, then check whether the result list is empty (image does not exist) or has one element (the image exists locally).</p></li>
|
||||
<li><p>The module will not attempt to pull images from registries. Use <a class="reference internal" href="docker_image_module.html#ansible-collections-community-docker-docker-image-module"><span class="std std-ref">community.docker.docker_image</span></a> with <em>source</em> set to <code class="docutils literal notranslate"><span class="pre">pull</span></code> to ensure an image is pulled.</p></li>
|
||||
<li><p>The module will not attempt to pull images from registries. Use <a class="reference internal" href="docker_image_module.html#ansible-collections-community-docker-docker-image-module"><span class="std std-ref">community.docker.docker_image</span></a> with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="docker_image_module.html#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=pull</span></span></a></code> to ensure an image is pulled.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="requirements">
|
||||
@@ -194,7 +194,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-info-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -217,7 +217,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -229,7 +229,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -240,7 +240,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -251,7 +251,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -272,8 +272,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -281,7 +281,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-name"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-info-module-parameter-name"><strong>name</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-name" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>An image name or a list of image names. Name format will be <code class="docutils literal notranslate"><span class="pre">name[:tag]</span></code> or <code class="docutils literal notranslate"><span class="pre">repository/name[:tag]</span></code>, where <code class="docutils literal notranslate"><span class="pre">tag</span></code> is optional. If a tag is not provided, <code class="docutils literal notranslate"><span class="pre">latest</span></code> will be used. Instead of image names, also image IDs can be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>An image name or a list of image names. Name format will be <code class="docutils literal notranslate"><span class="pre">name[:tag]</span></code> or <code class="docutils literal notranslate"><span class="pre">repository/name[:tag]</span></code>, where <code class="docutils literal notranslate"><span class="pre">tag</span></code> is optional. If a tag is not provided, <code class="ansible-value docutils literal notranslate"><span class="pre">latest</span></code> will be used. Instead of image names, also image IDs can be used.</p>
|
||||
<p>If no name is provided, a list of all images will be returned.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -289,8 +289,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-info-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -298,7 +298,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -306,8 +306,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-info-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-info-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -320,8 +320,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -344,7 +344,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -400,7 +400,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>This module was called <code class="docutils literal notranslate"><span class="pre">docker_image_facts</span></code> before Ansible 2.8. The usage did not change.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -193,7 +193,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-load-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -216,7 +216,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -228,7 +228,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -239,7 +239,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -250,7 +250,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -271,8 +271,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -287,8 +287,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-load-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -296,7 +296,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -304,8 +304,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-load-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-load-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -318,8 +318,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -342,7 +342,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -396,7 +396,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Does not support <code class="docutils literal notranslate"><span class="pre">check_mode</span></code>.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -192,7 +192,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -215,7 +215,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -223,7 +223,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-archive_path"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-archive-path"><strong>archive_path</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-archive_path" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to archive an image to a .tar file.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to archive an image to a <code class="docutils literal notranslate"><span class="pre">.tar</span></code> file.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -260,7 +260,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-build/container_limits/cpusetcpus" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>CPUs in which to allow execution.</p>
|
||||
<p>For example, <code class="docutils literal notranslate"><span class="pre">0-3</span></code> or <code class="docutils literal notranslate"><span class="pre">0,1</span></code>.</p>
|
||||
<p>For example, <code class="ansible-value docutils literal notranslate"><span class="pre">0-3</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">0,1</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -282,15 +282,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-build/container_limits/memswap" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Total memory (memory + swap).</p>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">-1</span></code> to disable swap.</p>
|
||||
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">-1</span></code> to disable swap.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-build/dockerfile"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-build-dockerfile"><strong>dockerfile</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-build/dockerfile" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> and source <code class="docutils literal notranslate"><span class="pre">build</span></code> to provide an alternate name for the Dockerfile to use when building an image.</p>
|
||||
<p>This can also include a relative path (relative to <em>path</em>).</p>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=build</span></span></a></code> to provide an alternate name for the Dockerfile to use when building an image.</p>
|
||||
<p>This can also include a relative path (relative to <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-build-path"><span class="std std-ref"><span class="pre">build.path</span></span></a></strong></code>).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -376,7 +376,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-build/use_config_proxy"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-build-use-config-proxy"><strong>use_config_proxy</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-build/use_config_proxy" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code> and a proxy configuration is specified in the docker client configuration (by default <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code>), the corresponding environment variables will be set in the container being built.</p>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> and a proxy configuration is specified in the docker client configuration (by default <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code>), the corresponding environment variables will be set in the container being built.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -392,7 +392,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -403,7 +403,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -414,7 +414,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -435,8 +435,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -444,7 +444,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-force_absent"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-force-absent"><strong>force_absent</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force_absent" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <em>absent</em> to un-tag and remove all images matching the specified name.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code> to un-tag and remove all images matching the specified name.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -456,7 +456,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-force_source"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-force-source"><strong>force_source</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force_source" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to build, load or pull an image (depending on the value of the <em>source</em> option) when the image already exists.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to build, load or pull an image (depending on the value of the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source</span></span></a></strong></code> option) when the image already exists.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -468,7 +468,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-force_tag"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-force-tag"><strong>force_tag</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force_tag" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to force tagging an image.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to force tagging an image.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -480,8 +480,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-load_path"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-load-path"><strong>load_path</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-load_path" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to load an image from a .tar file.</p>
|
||||
<p>Set <em>source</em> to <code class="docutils literal notranslate"><span class="pre">load</span></code> if you want to load the image.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to load an image from a <code class="docutils literal notranslate"><span class="pre">.tar</span></code> file.</p>
|
||||
<p>Set <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=load</span></span></a></code> if you want to load the image.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -489,7 +489,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-name" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Image name. Name format will be one of: <code class="docutils literal notranslate"><span class="pre">name</span></code>, <code class="docutils literal notranslate"><span class="pre">repository/name</span></code>, <code class="docutils literal notranslate"><span class="pre">registry_server:port/name</span></code>. When pushing or pulling an image the name can optionally include the tag by appending <code class="docutils literal notranslate"><span class="pre">:tag_name</span></code>.</p>
|
||||
<p>Note that image IDs (hashes) are only supported for <em>state=absent</em>, for <em>state=present</em> with <em>source=load</em>, and for <em>state=present</em> with <em>source=local</em>.</p>
|
||||
<p>Note that image IDs (hashes) are only supported for <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code>, for <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=load</span></span></a></code>, and for <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=local</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -512,7 +512,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-push"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-push"><strong>push</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-push" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Push the image to the registry. Specify the registry as part of the <em>name</em> or <em>repository</em> parameter.</p>
|
||||
<td><div class="ansible-option-cell"><p>Push the image to the registry. Specify the registry as part of the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> or <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-repository"><span class="std std-ref"><span class="pre">repository</span></span></a></strong></code> parameter.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -524,9 +524,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-repository"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-repository"><strong>repository</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-repository" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to tag the image.</p>
|
||||
<p>Expects format <code class="docutils literal notranslate"><span class="pre">repository:tag</span></code>. If no tag is provided, will use the value of the <em>tag</em> parameter or <code class="docutils literal notranslate"><span class="pre">latest</span></code>.</p>
|
||||
<p>If <em>push=true</em>, <em>repository</em> must either include a registry, or will be assumed to belong to the default registry (Docker Hub).</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to tag the image.</p>
|
||||
<p>Expects format <code class="docutils literal notranslate"><span class="pre">repository:tag</span></code>. If no tag is provided, will use the value of the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-tag"><span class="std std-ref"><span class="pre">tag</span></span></a></strong></code> parameter or <code class="ansible-value docutils literal notranslate"><span class="pre">latest</span></code>.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-push"><span class="std std-ref"><span class="pre">push=true</span></span></a></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-repository"><span class="std std-ref"><span class="pre">repository</span></span></a></strong></code> must either include a registry, or will be assumed to belong to the default registry (Docker Hub).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -534,10 +534,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-source" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Determines where the module will try to retrieve the image from.</p>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">build</span></code> to build the image from a <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>. <em>build.path</em> must be specified when this value is used.</p>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">load</span></code> to load the image from a <code class="docutils literal notranslate"><span class="pre">.tar</span></code> file. <em>load_path</em> must be specified when this value is used.</p>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">pull</span></code> to pull the image from a registry.</p>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">local</span></code> to make sure that the image is already available on the local docker daemon. This means that the module does not try to build, pull or load the image.</p>
|
||||
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">build</span></code> to build the image from a <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>. <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-build-path"><span class="std std-ref"><span class="pre">build.path</span></span></a></strong></code> must be specified when this value is used.</p>
|
||||
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">load</span></code> to load the image from a <code class="docutils literal notranslate"><span class="pre">.tar</span></code> file. <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-load-path"><span class="std std-ref"><span class="pre">load_path</span></span></a></strong></code> must be specified when this value is used.</p>
|
||||
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">pull</span></code> to pull the image from a registry.</p>
|
||||
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">local</span></code> to make sure that the image is already available on the local docker daemon. This means that the module does not try to build, pull or load the image.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"build"</span></code></p></li>
|
||||
@@ -551,8 +551,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -560,8 +560,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Make assertions about the state of an image.</p>
|
||||
<p>When <code class="docutils literal notranslate"><span class="pre">absent</span></code> an image will be removed. Use the force option to un-tag and remove all images matching the provided name.</p>
|
||||
<p>When <code class="docutils literal notranslate"><span class="pre">present</span></code> check if an image exists using the provided name and tag. If the image is not found or the force option is used, the image will either be pulled, built or loaded, depending on the <em>source</em> option.</p>
|
||||
<p>When <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> an image will be removed. Use the force option to un-tag and remove all images matching the provided name.</p>
|
||||
<p>When <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> check if an image exists using the provided name and tag. If the image is not found or the force option is used, the image will either be pulled, built or loaded, depending on the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source</span></span></a></strong></code> option.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"absent"</span></code></p></li>
|
||||
@@ -573,8 +573,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tag"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-tag"><strong>tag</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tag" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to <em>latest</em>.</p>
|
||||
<p>If <em>name</em> parameter format is <em>name:tag</em>, then tag value from <em>name</em> will take precedence.</p>
|
||||
<td><div class="ansible-option-cell"><p>Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to <code class="ansible-value docutils literal notranslate"><span class="pre">latest</span></code>.</p>
|
||||
<p>If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> parameter format is <code class="docutils literal notranslate"><span class="pre">name:tag</span></code>, then tag value from <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> will take precedence.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"latest"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -583,7 +583,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -591,8 +591,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -605,8 +605,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -629,7 +629,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -684,7 +684,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Building images is done using Docker daemon’s API. It is not possible to use BuildKit / buildx this way.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -194,7 +194,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-login-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -217,7 +217,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -229,7 +229,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -240,7 +240,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -251,7 +251,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -282,8 +282,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -292,7 +292,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-password" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The plaintext password for the registry account.</p>
|
||||
<p>Required when <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code>.</p>
|
||||
<p>Required when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-login-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -324,15 +324,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-login-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-login-module-parameter-state"><strong>state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>This controls the current state of the user. <code class="docutils literal notranslate"><span class="pre">present</span></code> will login in a user, <code class="docutils literal notranslate"><span class="pre">absent</span></code> will log them out.</p>
|
||||
<td><div class="ansible-option-cell"><p>This controls the current state of the user. <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> will login in a user, <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> will log them out.</p>
|
||||
<p>To logout you only need the registry server, which defaults to DockerHub.</p>
|
||||
<p>Before 2.1 you could ONLY log in.</p>
|
||||
<p>Docker does not support ‘logout’ with a custom config file.</p>
|
||||
@@ -348,7 +348,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -356,8 +356,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-login-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-login-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -370,8 +370,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -392,7 +392,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-username" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The username for the registry account.</p>
|
||||
<p>Required when <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code>.</p>
|
||||
<p>Required when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-login-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -402,7 +402,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -455,7 +455,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -501,7 +501,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-login_results" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Results from the login.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> when <em>state=present</em></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-login-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{"serveraddress":</span> <span class="pre">"localhost:5000",</span> <span class="pre">"username":</span> <span class="pre">"testuser"}</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -180,7 +180,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<li><p>Get inventory hosts from Docker Machine.</p></li>
|
||||
<li><p>Uses a YAML configuration file that ends with docker_machine.(yml|yaml).</p></li>
|
||||
<li><p>The plugin sets standard host variables <code class="docutils literal notranslate"><span class="pre">ansible_host</span></code>, <code class="docutils literal notranslate"><span class="pre">ansible_port</span></code>, <code class="docutils literal notranslate"><span class="pre">ansible_user</span></code> and <code class="docutils literal notranslate"><span class="pre">ansible_ssh_private_key</span></code>.</p></li>
|
||||
<li><p>The plugin stores the Docker Machine ‘env’ output variables in <em>dm_</em> prefixed host variables.</p></li>
|
||||
<li><p>The plugin stores the Docker Machine ‘env’ output variables in <code class="docutils literal notranslate"><span class="pre">dm_</span></code> prefixed host variables.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="requirements">
|
||||
@@ -212,10 +212,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-daemon_env" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Whether docker daemon connection environment variables should be fetched, and how to behave if they cannot be fetched.</p>
|
||||
<p>With <code class="docutils literal notranslate"><span class="pre">require</span></code> and <code class="docutils literal notranslate"><span class="pre">require-silently</span></code>, fetch them and skip any host for which they cannot be fetched. A warning will be issued for any skipped host if the choice is <code class="docutils literal notranslate"><span class="pre">require</span></code>.</p>
|
||||
<p>With <code class="docutils literal notranslate"><span class="pre">optional</span></code> and <code class="docutils literal notranslate"><span class="pre">optional-silently</span></code>, fetch them and not skip hosts for which they cannot be fetched. A warning will be issued for hosts where they cannot be fetched if the choice is <code class="docutils literal notranslate"><span class="pre">optional</span></code>.</p>
|
||||
<p>With <code class="docutils literal notranslate"><span class="pre">skip</span></code>, do not attempt to fetch the docker daemon connection environment variables.</p>
|
||||
<p>If fetched successfully, the variables will be prefixed with <em>dm_</em> and stored as host variables.</p>
|
||||
<p>With <code class="ansible-value docutils literal notranslate"><span class="pre">require</span></code> and <code class="ansible-value docutils literal notranslate"><span class="pre">require-silently</span></code>, fetch them and skip any host for which they cannot be fetched. A warning will be issued for any skipped host if the choice is <code class="ansible-value docutils literal notranslate"><span class="pre">require</span></code>.</p>
|
||||
<p>With <code class="ansible-value docutils literal notranslate"><span class="pre">optional</span></code> and <code class="ansible-value docutils literal notranslate"><span class="pre">optional-silently</span></code>, fetch them and not skip hosts for which they cannot be fetched. A warning will be issued for hosts where they cannot be fetched if the choice is <code class="ansible-value docutils literal notranslate"><span class="pre">optional</span></code>.</p>
|
||||
<p>With <code class="ansible-value docutils literal notranslate"><span class="pre">skip</span></code>, do not attempt to fetch the docker daemon connection environment variables.</p>
|
||||
<p>If fetched successfully, the variables will be prefixed with <code class="docutils literal notranslate"><span class="pre">dm_</span></code> and stored as host variables.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">"require"</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -329,7 +329,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-running_required"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-running-required"><strong>running_required</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-running_required" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When <code class="docutils literal notranslate"><span class="pre">true</span></code>, hosts which Docker Machine indicates are in a state other than <code class="docutils literal notranslate"><span class="pre">running</span></code> will be skipped.</p>
|
||||
<td><div class="ansible-option-cell"><p>When <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, hosts which Docker Machine indicates are in a state other than <code class="docutils literal notranslate"><span class="pre">running</span></code> will be skipped.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
@@ -377,7 +377,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-verbose_output"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-machine-inventory-parameter-verbose-output"><strong>verbose_output</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-verbose_output" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When <code class="docutils literal notranslate"><span class="pre">true</span></code>, include all available nodes metadata (for exmaple <code class="docutils literal notranslate"><span class="pre">Image</span></code>, <code class="docutils literal notranslate"><span class="pre">Region</span></code>, <code class="docutils literal notranslate"><span class="pre">Size</span></code>) as a JSON object named <code class="docutils literal notranslate"><span class="pre">docker_machine_node_attributes</span></code>.</p>
|
||||
<td><div class="ansible-option-cell"><p>When <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, include all available nodes metadata (for exmaple <code class="docutils literal notranslate"><span class="pre">Image</span></code>, <code class="docutils literal notranslate"><span class="pre">Region</span></code>, <code class="docutils literal notranslate"><span class="pre">Size</span></code>) as a JSON object named <code class="docutils literal notranslate"><span class="pre">docker_machine_node_attributes</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
|
||||
@@ -193,7 +193,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-network-info-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -216,7 +216,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -228,7 +228,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -239,7 +239,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -250,7 +250,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -271,8 +271,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -288,8 +288,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-network-info-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -297,7 +297,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -305,8 +305,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-network-info-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-network-info-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -319,8 +319,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -343,7 +343,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -398,7 +398,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -445,7 +445,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-network" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Facts representing the current state of the network. Matches the docker inspection output.</p>
|
||||
<p>Will be <code class="docutils literal notranslate"><span class="pre">none</span></code> if network does not exist.</p>
|
||||
<p>Will be <code class="ansible-value docutils literal notranslate"><span class="pre">none</span></code> if network does not exist.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> always</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{"Attachable":</span> <span class="pre">false,</span> <span class="pre">"ConfigFrom":</span> <span class="pre">{"Network":</span> <span class="pre">""},</span> <span class="pre">"ConfigOnly":</span> <span class="pre">false,</span> <span class="pre">"Containers":</span> <span class="pre">{},</span> <span class="pre">"Created":</span> <span class="pre">"2018-12-07T01:47:51.250835114-06:00",</span> <span class="pre">"Driver":</span> <span class="pre">"bridge",</span> <span class="pre">"EnableIPv6":</span> <span class="pre">false,</span> <span class="pre">"IPAM":</span> <span class="pre">{"Config":</span> <span class="pre">[{"Gateway":</span> <span class="pre">"192.168.96.1",</span> <span class="pre">"Subnet":</span> <span class="pre">"192.168.96.0/20"}],</span> <span class="pre">"Driver":</span> <span class="pre">"default",</span> <span class="pre">"Options":</span> <span class="pre">null},</span> <span class="pre">"Id":</span> <span class="pre">"0856968545f22026c41c2c7c3d448319d3b4a6a03a40b148b3ac4031696d1c0a",</span> <span class="pre">"Ingress":</span> <span class="pre">false,</span> <span class="pre">"Internal":</span> <span class="pre">false,</span> <span class="pre">"Labels":</span> <span class="pre">{},</span> <span class="pre">"Name":</span> <span class="pre">"ansible-test-f2700bba",</span> <span class="pre">"Options":</span> <span class="pre">{},</span> <span class="pre">"Scope":</span> <span class="pre">"local"}</span></code></p>
|
||||
</div></td>
|
||||
|
||||
@@ -193,7 +193,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-network-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -216,7 +216,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -227,7 +227,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>By default the connected list is canonical, meaning containers not on the list are removed from the network.</p>
|
||||
<p>Use <em>appends</em> to leave existing containers connected.</p>
|
||||
<p>Use <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-network-module-parameter-appends"><span class="std std-ref"><span class="pre">appends</span></span></a></strong></code> to leave existing containers connected.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -255,7 +255,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -266,7 +266,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -277,7 +277,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -309,8 +309,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -346,7 +346,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-force"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-network-module-parameter-force"><strong>force</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>With state <code class="docutils literal notranslate"><span class="pre">absent</span></code> forces disconnecting all containers from the network prior to deleting the network. With state <code class="docutils literal notranslate"><span class="pre">present</span></code> will disconnect all containers, delete the network and re-create the network.</p>
|
||||
<td><div class="ansible-option-cell"><p>With state <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> forces disconnecting all containers from the network prior to deleting the network. With state <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> will disconnect all containers, delete the network and re-create the network.</p>
|
||||
<p>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.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -371,7 +371,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ipam_config"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-network-module-parameter-ipam-config"><strong>ipam_config</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ipam_config" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of IPAM config blocks. Consult <a class="reference external" href="https://docs.docker.com/compose/compose-file/compose-file-v2/#ipam">Docker docs</a> for valid options and values. Note that <em>iprange</em> is spelled differently here (we use the notation from the Docker SDK for Python).</p>
|
||||
<td><div class="ansible-option-cell"><p>List of IPAM config blocks. Consult <a class="reference external" href="https://docs.docker.com/compose/compose-file/compose-file-v2/#ipam">Docker docs</a> for valid options and values. Note that <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-network-module-parameter-ipam-config-iprange"><span class="std std-ref"><span class="pre">ipam_config[].iprange</span></span></a></strong></code> is spelled differently here (we use the notation from the Docker SDK for Python).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
|
||||
@@ -450,16 +450,16 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-network-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-network-module-parameter-state"><strong>state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p><code class="docutils literal notranslate"><span class="pre">absent</span></code> deletes the network. If a network has connected containers, it cannot be deleted. Use the <em>force</em> option to disconnect all containers and delete the network.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">present</span></code> creates the network, if it does not already exist with the specified parameters, and connects the list of containers provided via the connected parameter. Containers not on the list will be disconnected. An empty list will leave no containers connected to the network. Use the <em>appends</em> option to leave existing containers connected. Use the <em>force</em> options to force re-creation of the network.</p>
|
||||
<td><div class="ansible-option-cell"><p><code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> deletes the network. If a network has connected containers, it cannot be deleted. Use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-network-module-parameter-force"><span class="std std-ref"><span class="pre">force</span></span></a></strong></code> option to disconnect all containers and delete the network.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> creates the network, if it does not already exist with the specified parameters, and connects the list of containers provided via the connected parameter. Containers not on the list will be disconnected. An empty list will leave no containers connected to the network. Use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-network-module-parameter-appends"><span class="std std-ref"><span class="pre">appends</span></span></a></strong></code> option to leave existing containers connected. Use the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-network-module-parameter-force"><span class="std std-ref"><span class="pre">force</span></span></a></strong></code> options to force re-creation of the network.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"absent"</span></code></p></li>
|
||||
@@ -472,7 +472,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -480,8 +480,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-network-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-network-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -494,8 +494,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -518,7 +518,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -571,9 +571,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>When network options are changed, the module disconnects all containers from the network, deletes the network, and re-creates the network. It does not try to reconnect containers, except the ones listed in (<em>connected</em>, and even for these, it does not consider specific connection options like fixed IP addresses or MAC addresses. If you need more control over how the containers are connected to the network, loop the <a class="reference internal" href="docker_container_module.html#ansible-collections-community-docker-docker-container-module"><span class="std std-ref">community.docker.docker_container</span></a> module to loop over your containers to make sure they are connected properly.</p></li>
|
||||
<li><p>When network options are changed, the module disconnects all containers from the network, deletes the network, and re-creates the network. It does not try to reconnect containers, except the ones listed in (<code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-network-module-parameter-connected"><span class="std std-ref"><span class="pre">connected</span></span></a></strong></code>, and even for these, it does not consider specific connection options like fixed IP addresses or MAC addresses. If you need more control over how the containers are connected to the network, loop the <a class="reference internal" href="docker_container_module.html#ansible-collections-community-docker-docker-container-module"><span class="std std-ref">community.docker.docker_container</span></a> module to loop over your containers to make sure they are connected properly.</p></li>
|
||||
<li><p>The module does not support Docker Swarm. This means that it will not try to disconnect or reconnect services. If services are connected to the network, deleting the network will fail. When network options are changed, the network has to be deleted and recreated, so this will fail as well.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -214,7 +214,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -226,7 +226,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -237,7 +237,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -248,7 +248,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -269,8 +269,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -282,16 +282,16 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p>The list of nodes names to inspect.</p>
|
||||
<p>If empty then return information of all nodes in Swarm cluster.</p>
|
||||
<p>When identifying the node use either the hostname of the node (as registered in Swarm) or node ID.</p>
|
||||
<p>If <em>self</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code> then this parameter is ignored.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-node-info-module-parameter-self"><span class="std std-ref"><span class="pre">self=true</span></span></a></code> then this parameter is ignored.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-self"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-node-info-module-parameter-self"><strong>self</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-self" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If <code class="docutils literal notranslate"><span class="pre">true</span></code>, queries the node (that is, the docker daemon) the module communicates with.</p>
|
||||
<p>If <code class="docutils literal notranslate"><span class="pre">true</span></code> then <em>name</em> is ignored.</p>
|
||||
<p>If <code class="docutils literal notranslate"><span class="pre">false</span></code> then query depends on <em>name</em> presence and value.</p>
|
||||
<td><div class="ansible-option-cell"><p>If <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, queries the node (that is, the docker daemon) the module communicates with.</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> then <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-info-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> is ignored.</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code> then query depends on <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-info-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> presence and value.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -303,8 +303,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-node-info-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -312,7 +312,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -320,8 +320,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-node-info-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-info-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -334,8 +334,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -359,7 +359,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -414,9 +414,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>When connecting to Docker daemon with TLS, you might need to install additional Python packages. For the Docker SDK for Python, version 2.4 or newer, this can be done by installing <code class="docutils literal notranslate"><span class="pre">docker[tls]</span></code> with <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/ansible/builtin/pip_module.html#ansible-collections-ansible-builtin-pip-module" title="(in Ansible vdevel)"><span class="xref std std-ref">ansible.builtin.pip</span></a>.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>This module uses the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -461,8 +461,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-nodes" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Facts representing the current state of the nodes. Matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">node</span> <span class="pre">inspect</span></code> output.</p>
|
||||
<p>Can contain multiple entries if more than one node provided in <em>name</em>, or <em>name</em> is not provided.</p>
|
||||
<p>If <em>name</em> contains a list of nodes, the output will provide information on all nodes registered at the swarm, including nodes that left the swarm but have not been removed from the cluster on swarm managers and nodes that are unreachable.</p>
|
||||
<p>Can contain multiple entries if more than one node provided in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-info-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code>, or <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-info-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> is not provided.</p>
|
||||
<p>If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-info-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> contains a list of nodes, the output will provide information on all nodes registered at the swarm, including nodes that left the swarm but have not been removed from the cluster on swarm managers and nodes that are unreachable.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> always</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -213,7 +213,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -238,7 +238,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -249,7 +249,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -260,7 +260,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -281,8 +281,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -299,17 +299,17 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-labels" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>User-defined key/value metadata that will be assigned as node attribute.</p>
|
||||
<p>Label operations in this module apply to the docker swarm node specified by <em>hostname</em>. Use <a class="reference internal" href="docker_swarm_module.html#ansible-collections-community-docker-docker-swarm-module"><span class="std std-ref">community.docker.docker_swarm</span></a> module to add/modify/remove swarm cluster labels.</p>
|
||||
<p>The actual state of labels assigned to the node when module completes its work depends on <em>labels_state</em> and <em>labels_to_remove</em> parameters values. See description below.</p>
|
||||
<p>Label operations in this module apply to the docker swarm node specified by <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-hostname"><span class="std std-ref"><span class="pre">hostname</span></span></a></strong></code>. Use <a class="reference internal" href="docker_swarm_module.html#ansible-collections-community-docker-docker-swarm-module"><span class="std std-ref">community.docker.docker_swarm</span></a> module to add/modify/remove swarm cluster labels.</p>
|
||||
<p>The actual state of labels assigned to the node when module completes its work depends on <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels-state"><span class="std std-ref"><span class="pre">labels_state</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels-to-remove"><span class="std std-ref"><span class="pre">labels_to_remove</span></span></a></strong></code> parameters values. See description below.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-labels_state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-node-module-parameter-labels-state"><strong>labels_state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-labels_state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>It defines the operation on the labels assigned to node and labels specified in <em>labels</em> option.</p>
|
||||
<p>Set to <code class="docutils literal notranslate"><span class="pre">merge</span></code> to combine labels provided in <em>labels</em> with those already assigned to the node. If no labels are assigned then it will add listed labels. For labels that are already assigned to the node, it will update their values. The labels not specified in <em>labels</em> will remain unchanged. If <em>labels</em> is empty then no changes will be made.</p>
|
||||
<p>Set to <code class="docutils literal notranslate"><span class="pre">replace</span></code> to replace all assigned labels with provided ones. If <em>labels</em> is empty then all labels assigned to the node will be removed.</p>
|
||||
<td><div class="ansible-option-cell"><p>It defines the operation on the labels assigned to node and labels specified in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> option.</p>
|
||||
<p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">merge</span></code> to combine labels provided in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> with those already assigned to the node. If no labels are assigned then it will add listed labels. For labels that are already assigned to the node, it will update their values. The labels not specified in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> will remain unchanged. If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> is empty then no changes will be made.</p>
|
||||
<p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">replace</span></code> to replace all assigned labels with provided ones. If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> is empty then all labels assigned to the node will be removed.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">"merge"</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -323,8 +323,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of labels that will be removed from the node configuration. The list has to contain only label names, not their values.</p>
|
||||
<p>If the label provided on the list is not assigned to the node, the entry is ignored.</p>
|
||||
<p>If the label is both on the <em>labels_to_remove</em> and <em>labels</em>, then value provided in <em>labels</em> remains assigned to the node.</p>
|
||||
<p>If <em>labels_state</em> is <code class="docutils literal notranslate"><span class="pre">replace</span></code> and <em>labels</em> is not provided or empty then all labels assigned to node are removed and <em>labels_to_remove</em> is ignored.</p>
|
||||
<p>If the label is both on the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels-to-remove"><span class="std std-ref"><span class="pre">labels_to_remove</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code>, then value provided in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> remains assigned to the node.</p>
|
||||
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels-state"><span class="std std-ref"><span class="pre">labels_state=replace</span></span></a></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels"><span class="std std-ref"><span class="pre">labels</span></span></a></strong></code> is not provided or empty then all labels assigned to node are removed and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-labels-to-remove"><span class="std std-ref"><span class="pre">labels_to_remove</span></span></a></strong></code> is ignored.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -343,8 +343,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-node-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -352,7 +352,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -360,8 +360,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-node-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-node-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -374,8 +374,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -399,7 +399,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -452,9 +452,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>When connecting to Docker daemon with TLS, you might need to install additional Python packages. For the Docker SDK for Python, version 2.4 or newer, this can be done by installing <code class="docutils literal notranslate"><span class="pre">docker[tls]</span></code> with <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/ansible/builtin/pip_module.html#ansible-collections-ansible-builtin-pip-module" title="(in Ansible vdevel)"><span class="xref std std-ref">ansible.builtin.pip</span></a>.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>This module uses the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -194,7 +194,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-plugin-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -225,7 +225,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -237,7 +237,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -248,7 +248,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -259,7 +259,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -280,8 +280,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -324,18 +324,18 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-plugin-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-plugin-module-parameter-state"><strong>state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p><code class="docutils literal notranslate"><span class="pre">absent</span></code> remove the plugin.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">present</span></code> install the plugin, if it does not already exist.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">enable</span></code> enable the plugin.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">disable</span></code> disable the plugin.</p>
|
||||
<td><div class="ansible-option-cell"><p><code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> remove the plugin.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> install the plugin, if it does not already exist.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">enable</span></code> enable the plugin.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">disable</span></code> disable the plugin.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"absent"</span></code></p></li>
|
||||
@@ -350,7 +350,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -358,8 +358,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-plugin-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-plugin-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -372,8 +372,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -396,7 +396,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -449,7 +449,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -500,7 +500,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-actions" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of actions performed during task execution.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> when <em>state!=absent</em></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> when <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-plugin-module-parameter-state"><span class="std std-ref"><span class="pre">state</span></span></a></strong></code> is not <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
|
||||
@@ -192,7 +192,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -215,7 +215,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -239,7 +239,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -250,7 +250,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -261,7 +261,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -303,8 +303,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -353,8 +353,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-prune-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -362,7 +362,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -370,8 +370,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-prune-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -384,8 +384,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -408,7 +408,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -482,7 +482,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>The module always returned <code class="docutils literal notranslate"><span class="pre">changed=false</span></code> before community.docker 3.5.1.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -531,7 +531,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-builder_cache_space_reclaimed" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Amount of reclaimed disk space from builder cache pruning in bytes.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <em>builder_cache</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-builder-cache"><span class="std std-ref"><span class="pre">builder_cache=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">0</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -540,7 +540,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-containers" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of IDs of deleted containers.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <em>containers</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-containers"><span class="std std-ref"><span class="pre">containers=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">[]</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -549,7 +549,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-containers_space_reclaimed" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Amount of reclaimed disk space from container pruning in bytes.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <em>containers</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-containers"><span class="std std-ref"><span class="pre">containers=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">0</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -558,7 +558,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-images" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of IDs of deleted images.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <em>images</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-images"><span class="std std-ref"><span class="pre">images=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">[]</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -567,7 +567,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-images_space_reclaimed" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Amount of reclaimed disk space from image pruning in bytes.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <em>images</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-images"><span class="std std-ref"><span class="pre">images=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">0</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -576,7 +576,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-networks" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of IDs of deleted networks.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <em>networks</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-networks"><span class="std std-ref"><span class="pre">networks=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">[]</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -585,7 +585,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-volumes" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of IDs of deleted volumes.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <em>volumes</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-volumes"><span class="std std-ref"><span class="pre">volumes=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">[]</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -594,7 +594,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-volumes_space_reclaimed" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Amount of reclaimed disk space from volumes pruning in bytes.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <em>volumes</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-prune-module-parameter-volumes"><span class="std std-ref"><span class="pre">volumes=true</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">0</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -184,7 +184,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Permalink to this heading"></a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Create and remove Docker secrets in a Swarm environment. Similar to <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">secret</span> <span class="pre">create</span></code> and <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">secret</span> <span class="pre">rm</span></code>.</p></li>
|
||||
<li><p>Adds to the metadata of new secrets <code class="docutils literal notranslate"><span class="pre">ansible_key</span></code>, an encrypted hash representation of the data, which is then used in future runs to test if a secret has changed. If <code class="docutils literal notranslate"><span class="pre">ansible_key</span></code> is not present, then a secret will not be updated unless the <em>force</em> option is set.</p></li>
|
||||
<li><p>Adds to the metadata of new secrets <code class="docutils literal notranslate"><span class="pre">ansible_key</span></code>, an encrypted hash representation of the data, which is then used in future runs to test if a secret has changed. If <code class="docutils literal notranslate"><span class="pre">ansible_key</span></code> is not present, then a secret will not be updated unless the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-force"><span class="std std-ref"><span class="pre">force</span></span></a></strong></code> option is set.</p></li>
|
||||
<li><p>Updates to secrets are performed by removing the secret and creating it again.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -215,7 +215,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -227,7 +227,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -238,7 +238,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -249,7 +249,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -257,15 +257,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-data" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The value of the secret.</p>
|
||||
<p>Mutually exclusive with <em>data_src</em>. One of <em>data</em> and <em>data_src</em> is required if <em>state=present</em>.</p>
|
||||
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-data-src"><span class="std std-ref"><span class="pre">data_src</span></span></a></strong></code>. One of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-data-src"><span class="std std-ref"><span class="pre">data_src</span></span></a></strong></code> is required if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-data_is_b64"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-secret-module-parameter-data-is-b64"><strong>data_is_b64</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-data_is_b64" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, the data is assumed to be Base64 encoded and will be decoded before being used.</p>
|
||||
<p>To use binary <em>data</em>, it is better to keep it Base64 encoded and let it be decoded by this option.</p>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, the data is assumed to be Base64 encoded and will be decoded before being used.</p>
|
||||
<p>To use binary <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code>, it is better to keep it Base64 encoded and let it be decoded by this option.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -279,7 +279,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 1.10.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The file on the target from which to read the secret.</p>
|
||||
<p>Mutually exclusive with <em>data</em>. One of <em>data</em> and <em>data_src</em> is required if <em>state=present</em>.</p>
|
||||
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code>. One of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-data"><span class="std std-ref"><span class="pre">data</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-data-src"><span class="std std-ref"><span class="pre">data_src</span></span></a></strong></code> is required if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -300,8 +300,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -309,8 +309,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-force"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-secret-module-parameter-force"><strong>force</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to always remove and recreate an existing secret.</p>
|
||||
<p>If <code class="docutils literal notranslate"><span class="pre">true</span></code>, an existing secret will be replaced, even if it has not changed.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to always remove and recreate an existing secret.</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, an existing secret will be replaced, even if it has not changed.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -338,7 +338,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-rolling_versions" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.2.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, secrets are created with an increasing version number appended to their name.</p>
|
||||
<td><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, secrets are created with an increasing version number appended to their name.</p>
|
||||
<p>Adds a label containing the version number to the managed secrets with the name <code class="docutils literal notranslate"><span class="pre">ansible_version</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -351,15 +351,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-secret-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-secret-module-parameter-state"><strong>state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Set to <code class="docutils literal notranslate"><span class="pre">present</span></code>, if the secret should exist, and <code class="docutils literal notranslate"><span class="pre">absent</span></code>, if it should not.</p>
|
||||
<td><div class="ansible-option-cell"><p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code>, if the secret should exist, and <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code>, if it should not.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"absent"</span></code></p></li>
|
||||
@@ -372,7 +372,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -380,8 +380,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-secret-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -394,8 +394,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -419,7 +419,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -432,9 +432,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-versions_to_keep" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.2.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When using <em>rolling_versions</em>, the number of old versions of the secret to keep.</p>
|
||||
<td><div class="ansible-option-cell"><p>When using <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-rolling-versions"><span class="std std-ref"><span class="pre">rolling_versions</span></span></a></strong></code>, the number of old versions of the secret to keep.</p>
|
||||
<p>Extraneous old secrets are deleted after the new one is created.</p>
|
||||
<p>Set to <code class="docutils literal notranslate"><span class="pre">-1</span></code> to keep everything or to <code class="docutils literal notranslate"><span class="pre">0</span></code> or <code class="docutils literal notranslate"><span class="pre">1</span></code> to keep only the current one.</p>
|
||||
<p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">-1</span></code> to keep everything or to <code class="ansible-value docutils literal notranslate"><span class="pre">0</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">1</span></code> to keep only the current one.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">5</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -483,9 +483,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>When connecting to Docker daemon with TLS, you might need to install additional Python packages. For the Docker SDK for Python, version 2.4 or newer, this can be done by installing <code class="docutils literal notranslate"><span class="pre">docker[tls]</span></code> with <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/ansible/builtin/pip_module.html#ansible-collections-ansible-builtin-pip-module" title="(in Ansible vdevel)"><span class="xref std std-ref">ansible.builtin.pip</span></a>.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>This module uses the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -576,7 +576,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-secret_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The ID assigned by Docker to the secret object.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"hzehrmyjigmcp2gb6nlhmjqcv"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -586,7 +586,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.2.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The name of the created secret object.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code></p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-secret-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code></p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"awesome_secret"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -205,7 +205,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-absent_retries"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-stack-module-parameter-absent-retries"><strong>absent_retries</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-absent_retries" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If <code class="docutils literal notranslate"><span class="pre">>0</span></code> and <em>state</em> is <code class="docutils literal notranslate"><span class="pre">absent</span></code> the module will retry up to <em>absent_retries</em> times to delete the stack until all the resources have been effectively deleted. If the last try still reports the stack as not completely removed the module will fail.</p>
|
||||
<td><div class="ansible-option-cell"><p>If larger than <code class="ansible-value docutils literal notranslate"><span class="pre">0</span></code> and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-stack-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code> the module will retry up to <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-stack-module-parameter-absent-retries"><span class="std std-ref"><span class="pre">absent_retries</span></span></a></strong></code> times to delete the stack until all the resources have been effectively deleted. If the last try still reports the stack as not completely removed the module will fail.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">0</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -213,7 +213,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-absent_retries_interval"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-stack-module-parameter-absent-retries-interval"><strong>absent_retries_interval</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-absent_retries_interval" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Interval in seconds between consecutive <em>absent_retries</em>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Interval in seconds between consecutive <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-stack-module-parameter-absent-retries"><span class="std std-ref"><span class="pre">absent_retries</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">1</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -215,7 +215,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -227,7 +227,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -238,7 +238,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -249,7 +249,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -270,8 +270,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -321,8 +321,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -351,7 +351,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -359,8 +359,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -373,8 +373,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -410,7 +410,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -422,9 +422,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-verbose_output"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-parameter-verbose-output"><strong>verbose_output</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-verbose_output" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When set to <code class="docutils literal notranslate"><span class="pre">true</span></code> and <em>nodes</em>, <em>services</em> or <em>tasks</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, then the module output will contain verbose information about objects matching the full output of API method.</p>
|
||||
<td><div class="ansible-option-cell"><p>When set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-nodes"><span class="std std-ref"><span class="pre">nodes</span></span></a></strong></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-services"><span class="std std-ref"><span class="pre">services</span></span></a></strong></code>, or <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-tasks"><span class="std std-ref"><span class="pre">tasks</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, then the module output will contain verbose information about objects matching the full output of API method.</p>
|
||||
<p>For details see the documentation of your version of Docker API at <a class="reference external" href="https://docs.docker.com/engine/api/">https://docs.docker.com/engine/api/</a>.</p>
|
||||
<p>The verbose output in this module contains only subset of information returned by <em>_info</em> module for each type of the objects.</p>
|
||||
<p>The verbose output in this module contains only subset of information returned by this info module for each type of the objects.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -479,9 +479,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>When connecting to Docker daemon with TLS, you might need to install additional Python packages. For the Docker SDK for Python, version 2.4 or newer, this can be done by installing <code class="docutils literal notranslate"><span class="pre">docker[tls]</span></code> with <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/ansible/builtin/pip_module.html#ansible-collections-ansible-builtin-pip-module" title="(in Ansible vdevel)"><span class="xref std std-ref">ansible.builtin.pip</span></a>.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>This module uses the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -547,7 +547,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="return-can_talk_to_docker"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-return-can-talk-to-docker"><strong>can_talk_to_docker</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-can_talk_to_docker" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Will be <code class="docutils literal notranslate"><span class="pre">true</span></code> if the module can talk to the docker daemon.</p>
|
||||
<td><div class="ansible-option-cell"><p>Will be <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> if the module can talk to the docker daemon.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> both on success and on error</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -555,7 +555,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="return-docker_swarm_active"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-return-docker-swarm-active"><strong>docker_swarm_active</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-docker_swarm_active" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Will be <code class="docutils literal notranslate"><span class="pre">true</span></code> if the module can talk to the docker daemon, and the docker daemon is in Swarm mode.</p>
|
||||
<td><div class="ansible-option-cell"><p>Will be <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> if the module can talk to the docker daemon, and the docker daemon is in Swarm mode.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> both on success and on error</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -563,8 +563,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="return-docker_swarm_manager"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-return-docker-swarm-manager"><strong>docker_swarm_manager</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-docker_swarm_manager" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Will be <code class="docutils literal notranslate"><span class="pre">true</span></code> if the module can talk to the docker daemon, the docker daemon is in Swarm mode, and the current node is a manager node.</p>
|
||||
<p>Only if this one is <code class="docutils literal notranslate"><span class="pre">true</span></code>, the module will not fail.</p>
|
||||
<td><div class="ansible-option-cell"><p>Will be <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> if the module can talk to the docker daemon, the docker daemon is in Swarm mode, and the current node is a manager node.</p>
|
||||
<p>Only if this one is <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, the module will not fail.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> both on success and on error</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -572,16 +572,16 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="return-nodes"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-return-nodes"><strong>nodes</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-nodes" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each volume. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">node</span> <span class="pre">ls</span></code> output unless <em>verbose_output=true</em>. See description for <em>verbose_output</em>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>nodes</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each volume. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">node</span> <span class="pre">ls</span></code> output unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output=true</span></span></a></code>. See description for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-nodes"><span class="std std-ref"><span class="pre">nodes=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-services"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-return-services"><strong>services</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-services" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each volume. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">ls</span></code> output unless <em>verbose_output=true</em>. See description for <em>verbose_output</em>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>services</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each volume. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">ls</span></code> output unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output=true</span></span></a></code>. See description for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-services"><span class="std std-ref"><span class="pre">services=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -598,15 +598,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-swarm_unlock_key" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Contains the key needed to unlock the swarm.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>unlock_key</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-unlock-key"><span class="std std-ref"><span class="pre">unlock_key=true</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="return-tasks"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-info-module-return-tasks"><strong>tasks</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-tasks" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each volume. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">ps</span></code> output unless <em>verbose_output=true</em>. See description for <em>verbose_output</em>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <em>tasks</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
|
||||
<td><div class="ansible-option-cell"><p>List of dict objects containing the basic information about each volume. Keys matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">ps</span></code> output unless <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output=true</span></span></a></code>. See description for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-verbose-output"><span class="std std-ref"><span class="pre">verbose_output</span></span></a></strong></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-info-module-parameter-tasks"><span class="std std-ref"><span class="pre">tasks=true</span></span></a></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -178,7 +178,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Reads inventories from the Docker swarm API.</p></li>
|
||||
<li><p>Uses a YAML configuration file docker_swarm.[yml|yaml].</p></li>
|
||||
<li><p>The plugin returns following groups of swarm nodes: <em>all</em> - all hosts; <em>workers</em> - all worker nodes; <em>managers</em> - all manager nodes; <em>leader</em> - the swarm leader node; <em>nonleaders</em> - all nodes except the swarm leader.</p></li>
|
||||
<li><p>The plugin returns following groups of swarm nodes: <code class="docutils literal notranslate"><span class="pre">all</span></code> - all hosts; <code class="docutils literal notranslate"><span class="pre">workers</span></code> - all worker nodes; <code class="docutils literal notranslate"><span class="pre">managers</span></code> - all manager nodes; <code class="docutils literal notranslate"><span class="pre">leader</span></code> - the swarm leader node; <code class="docutils literal notranslate"><span class="pre">nonleaders</span></code> - all nodes except the swarm leader.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="requirements">
|
||||
@@ -253,7 +253,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Socket of a Docker swarm manager node (<code class="docutils literal notranslate"><span class="pre">tcp</span></code>, <code class="docutils literal notranslate"><span class="pre">unix</span></code>).</p>
|
||||
<p>Use <code class="docutils literal notranslate"><span class="pre">unix://var/run/docker.sock</span></code> to connect via local socket.</p>
|
||||
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">unix://var/run/docker.sock</span></code> to connect via local socket.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -268,7 +268,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-include_host_uri"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-inventory-parameter-include-host-uri"><strong>include_host_uri</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-include_host_uri" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Toggle to return the additional attribute <code class="docutils literal notranslate"><span class="pre">ansible_host_uri</span></code> which contains the URI of the swarm leader in format of <code class="docutils literal notranslate"><span class="pre">tcp://172.16.0.1:2376</span></code>. This value may be used without additional modification as value of option <em>docker_host</em> in Docker Swarm modules when connecting via API. The port always defaults to <code class="docutils literal notranslate"><span class="pre">2376</span></code>.</p>
|
||||
<td><div class="ansible-option-cell"><p>Toggle to return the additional attribute <code class="docutils literal notranslate"><span class="pre">ansible_host_uri</span></code> which contains the URI of the swarm leader in format of <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://172.16.0.1:2376</span></code>. This value may be used without additional modification as value of option <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-inventory-parameter-docker-host"><span class="std std-ref"><span class="pre">docker_host</span></span></a></strong></code> in Docker Swarm modules when connecting via API. The port always defaults to <code class="ansible-value docutils literal notranslate"><span class="pre">2376</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -280,7 +280,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-include_host_uri_port"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-inventory-parameter-include-host-uri-port"><strong>include_host_uri_port</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-include_host_uri_port" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Override the detected port number included in <em>ansible_host_uri</em></p>
|
||||
<td><div class="ansible-option-cell"><p>Override the detected port number included in <code class="docutils literal notranslate"><span class="pre">ansible_host_uri</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -366,7 +366,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-plugin"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-inventory-parameter-plugin"><strong>plugin</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-plugin" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The name of this plugin, it should always be set to <code class="docutils literal notranslate"><span class="pre">community.docker.docker_swarm</span></code> for this plugin to recognize it as it’s own.</p>
|
||||
<td><div class="ansible-option-cell"><p>The name of this plugin, it should always be set to <code class="ansible-value docutils literal notranslate"><span class="pre">community.docker.docker_swarm</span></code> for this plugin to recognize it as it’s own.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"docker_swarm"</span></code></p></li>
|
||||
@@ -378,7 +378,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-inventory-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -401,7 +401,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -479,7 +479,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-verbose_output"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-inventory-parameter-verbose-output"><strong>verbose_output</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-verbose_output" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Toggle to (not) include all available nodes metadata (for example <code class="docutils literal notranslate"><span class="pre">Platform</span></code>, <code class="docutils literal notranslate"><span class="pre">Architecture</span></code>, <code class="docutils literal notranslate"><span class="pre">OS</span></code>, <code class="docutils literal notranslate"><span class="pre">EngineVersion</span></code>)</p>
|
||||
<td><div class="ansible-option-cell"><p>Toggle to (not) include all available nodes metadata (for example <code class="docutils literal notranslate"><span class="pre">Platform</span></code>, <code class="docutils literal notranslate"><span class="pre">Architecture</span></code>, <code class="docutils literal notranslate"><span class="pre">OS</span></code>, <code class="docutils literal notranslate"><span class="pre">EngineVersion</span></code>).</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
|
||||
|
||||
@@ -210,9 +210,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-advertise_addr" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Externally reachable address advertised to other nodes.</p>
|
||||
<p>This can either be an address/port combination in the form <code class="docutils literal notranslate"><span class="pre">192.168.1.1:4567</span></code>, or an interface followed by a port number, like <code class="docutils literal notranslate"><span class="pre">eth0:4567</span></code>.</p>
|
||||
<p>This can either be an address/port combination in the form <code class="ansible-value docutils literal notranslate"><span class="pre">192.168.1.1:4567</span></code>, or an interface followed by a port number, like <code class="ansible-value docutils literal notranslate"><span class="pre">eth0:4567</span></code>.</p>
|
||||
<p>If the port number is omitted, the port number from the listen address is used.</p>
|
||||
<p>If <em>advertise_addr</em> is not specified, it will be automatically detected when possible.</p>
|
||||
<p>If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-advertise-addr"><span class="std std-ref"><span class="pre">advertise_addr</span></span></a></strong></code> is not specified, it will be automatically detected when possible.</p>
|
||||
<p>Only used when swarm is initialised or joined. Because of this it’s not considered for idempotency checking.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -224,7 +224,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -233,7 +233,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-autolock_managers" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>If set, generate a key and use it to lock data stored on the managers.</p>
|
||||
<p>Docker default value is <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p>Docker default value is <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code>.</p>
|
||||
<p><a class="reference internal" href="docker_swarm_info_module.html#ansible-collections-community-docker-docker-swarm-info-module"><span class="std std-ref">community.docker.docker_swarm_info</span></a> can be used to retrieve the unlock key.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -250,7 +250,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -258,7 +258,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-ca_force_rotate" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>An integer whose purpose is to force swarm to generate a new signing CA certificate and key, if none have been specified.</p>
|
||||
<p>Docker default value is <code class="docutils literal notranslate"><span class="pre">0</span></code>.</p>
|
||||
<p>Docker default value is <code class="ansible-value docutils literal notranslate"><span class="pre">0</span></code>.</p>
|
||||
<p>Requires API version >= 1.30.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -270,7 +270,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -281,7 +281,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -290,7 +290,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 2.5.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Address or interface to use for data path traffic.</p>
|
||||
<p>This can either be an address in the form <code class="docutils literal notranslate"><span class="pre">192.168.1.1</span></code>, or an interface, like <code class="docutils literal notranslate"><span class="pre">eth0</span></code>.</p>
|
||||
<p>This can either be an address in the form <code class="ansible-value docutils literal notranslate"><span class="pre">192.168.1.1</span></code>, or an interface, like <code class="ansible-value docutils literal notranslate"><span class="pre">eth0</span></code>.</p>
|
||||
<p>Only used when swarm is initialised or joined. Because of this it is not considered for idempotency checking.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -300,7 +300,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p><span class="ansible-option-versionadded">added in community.docker 3.1.0</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Port to use for data path traffic.</p>
|
||||
<p>This needs to be a port number like <code class="docutils literal notranslate"><span class="pre">9789</span></code>.</p>
|
||||
<p>This needs to be a port number like <code class="ansible-value docutils literal notranslate"><span class="pre">9789</span></code>.</p>
|
||||
<p>Only used when swarm is initialised. Because of this it is not considered for idempotency checking.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -330,7 +330,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-dispatcher_heartbeat_period" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The delay (in nanoseconds) for an agent to send a heartbeat to the dispatcher.</p>
|
||||
<p>Docker default value is 5 seconds, which corresponds to a value of <code class="docutils literal notranslate"><span class="pre">5000000000</span></code>.</p>
|
||||
<p>Docker default value is 5 seconds, which corresponds to a value of <code class="ansible-value docutils literal notranslate"><span class="pre">5000000000</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -339,8 +339,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -349,15 +349,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-election_tick" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Amount of ticks (in seconds) needed without a leader to trigger a new election.</p>
|
||||
<p>Docker default value is <code class="docutils literal notranslate"><span class="pre">10</span></code> seconds.</p>
|
||||
<p>Docker default value is <code class="ansible-value docutils literal notranslate"><span class="pre">10</span></code> seconds.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-force"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-module-parameter-force"><strong>force</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-force" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to force creating a new Swarm, even if already part of one.</p>
|
||||
<p>Use with state <code class="docutils literal notranslate"><span class="pre">absent</span></code> to Leave the swarm even if this node is a manager.</p>
|
||||
<td><div class="ansible-option-cell"><p>Use with state <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> to force creating a new Swarm, even if already part of one.</p>
|
||||
<p>Use with state <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> to Leave the swarm even if this node is a manager.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -370,7 +370,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-heartbeat_tick" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Amount of ticks (in seconds) between each heartbeat.</p>
|
||||
<p>Docker default value is <code class="docutils literal notranslate"><span class="pre">1</span></code> seconds.</p>
|
||||
<p>Docker default value is <code class="ansible-value docutils literal notranslate"><span class="pre">1</span></code> seconds.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -378,7 +378,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-join_token" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Swarm token used to join a swarm cluster.</p>
|
||||
<p>Used with <em>state=join</em>.</p>
|
||||
<p>Used with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-state"><span class="std std-ref"><span class="pre">state=join</span></span></a></code>.</p>
|
||||
<p>If this value is specified, the corresponding value in the return values will be censored by Ansible. This is a side-effect of this value not being logged.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -387,7 +387,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-keep_old_snapshots" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Number of snapshots to keep beyond the current snapshot.</p>
|
||||
<p>Docker default value is <code class="docutils literal notranslate"><span class="pre">0</span></code>.</p>
|
||||
<p>Docker default value is <code class="ansible-value docutils literal notranslate"><span class="pre">0</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -404,7 +404,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-listen_addr" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Listen address used for inter-manager communication.</p>
|
||||
<p>This can either be an address/port combination in the form <code class="docutils literal notranslate"><span class="pre">192.168.1.1:4567</span></code>, or an interface followed by a port number, like <code class="docutils literal notranslate"><span class="pre">eth0:4567</span></code>.</p>
|
||||
<p>This can either be an address/port combination in the form <code class="ansible-value docutils literal notranslate"><span class="pre">192.168.1.1:4567</span></code>, or an interface followed by a port number, like <code class="ansible-value docutils literal notranslate"><span class="pre">eth0:4567</span></code>.</p>
|
||||
<p>If the port number is omitted, the default swarm listening port is used.</p>
|
||||
<p>Only used when swarm is initialised or joined. Because of this it’s not considered for idempotency checking.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"0.0.0.0:2377"</span></code></p>
|
||||
@@ -429,7 +429,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-node_cert_expiry" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Automatic expiry for nodes certificates, given in nanoseconds.</p>
|
||||
<p>Docker default value is 90 days, which corresponds to a value of <code class="docutils literal notranslate"><span class="pre">7776000000000000</span></code>.</p>
|
||||
<p>Docker default value is 90 days, which corresponds to a value of <code class="ansible-value docutils literal notranslate"><span class="pre">7776000000000000</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -437,7 +437,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-node_id" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Swarm id of the node to remove.</p>
|
||||
<p>Used with <em>state=remove</em>.</p>
|
||||
<p>Used with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-state"><span class="std std-ref"><span class="pre">state=remove</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -445,7 +445,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-remote_addrs" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Remote address of one or more manager nodes of an existing Swarm to connect to.</p>
|
||||
<p>Used with <em>state=join</em>.</p>
|
||||
<p>Used with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-state"><span class="std std-ref"><span class="pre">state=join</span></span></a></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -495,25 +495,25 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-snapshot_interval" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Number of logs entries between snapshot.</p>
|
||||
<p>Docker default value is <code class="docutils literal notranslate"><span class="pre">10000</span></code>.</p>
|
||||
<p>Docker default value is <code class="ansible-value docutils literal notranslate"><span class="pre">10000</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-module-parameter-state"><strong>state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Set to <code class="docutils literal notranslate"><span class="pre">present</span></code>, to create/update a new cluster.</p>
|
||||
<p>Set to <code class="docutils literal notranslate"><span class="pre">join</span></code>, to join an existing cluster.</p>
|
||||
<p>Set to <code class="docutils literal notranslate"><span class="pre">absent</span></code>, to leave an existing cluster.</p>
|
||||
<p>Set to <code class="docutils literal notranslate"><span class="pre">remove</span></code>, to remove an absent node from the cluster. Note that removing requires Docker SDK for Python >= 2.4.0.</p>
|
||||
<td><div class="ansible-option-cell"><p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code>, to create/update a new cluster.</p>
|
||||
<p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">join</span></code>, to join an existing cluster.</p>
|
||||
<p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code>, to leave an existing cluster.</p>
|
||||
<p>Set to <code class="ansible-value docutils literal notranslate"><span class="pre">remove</span></code>, to remove an absent node from the cluster. Note that removing requires Docker SDK for Python >= 2.4.0.</p>
|
||||
<p><a class="reference internal" href="docker_node_module.html#ansible-collections-community-docker-docker-node-module"><span class="std std-ref">community.docker.docker_node</span></a> can be used to demote a manager before removal.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
@@ -538,7 +538,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-task_history_retention_limit" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Maximum number of tasks history stored.</p>
|
||||
<p>Docker default value is <code class="docutils literal notranslate"><span class="pre">5</span></code>.</p>
|
||||
<p>Docker default value is <code class="ansible-value docutils literal notranslate"><span class="pre">5</span></code>.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -546,7 +546,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -554,8 +554,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -568,8 +568,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -593,7 +593,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -646,9 +646,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>When connecting to Docker daemon with TLS, you might need to install additional Python packages. For the Docker SDK for Python, version 2.4 or newer, this can be done by installing <code class="docutils literal notranslate"><span class="pre">docker[tls]</span></code> with <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/ansible/builtin/pip_module.html#ansible-collections-ansible-builtin-pip-module" title="(in Ansible vdevel)"><span class="xref std std-ref">ansible.builtin.pip</span></a>.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>This module uses the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -738,7 +738,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-swarm_facts/JoinTokens/Manager" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Token to join the cluster as a new *manager* node.</p>
|
||||
<p><strong>Note:</strong> if this value has been specified as <em>join_token</em>, the value here will not be the token, but <code class="docutils literal notranslate"><span class="pre">VALUE_SPECIFIED_IN_NO_LOG_PARAMETER</span></code>. If you pass <em>join_token</em>, make sure your playbook/role does not depend on this return value!</p>
|
||||
<p><strong>Note:</strong> if this value has been specified as <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-join-token"><span class="std std-ref"><span class="pre">join_token</span></span></a></strong></code>, the value here will not be the token, but <code class="docutils literal notranslate"><span class="pre">VALUE_SPECIFIED_IN_NO_LOG_PARAMETER</span></code>. If you pass <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-join-token"><span class="std std-ref"><span class="pre">join_token</span></span></a></strong></code>, make sure your playbook/role does not depend on this return value!</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"SWMTKN-1--xxxxx"</span></code></p>
|
||||
</div></td>
|
||||
@@ -748,7 +748,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-swarm_facts/JoinTokens/Worker" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Token to join the cluster as a new *worker* node.</p>
|
||||
<p><strong>Note:</strong> if this value has been specified as <em>join_token</em>, the value here will not be the token, but <code class="docutils literal notranslate"><span class="pre">VALUE_SPECIFIED_IN_NO_LOG_PARAMETER</span></code>. If you pass <em>join_token</em>, make sure your playbook/role does not depend on this return value!</p>
|
||||
<p><strong>Note:</strong> if this value has been specified as <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-join-token"><span class="std std-ref"><span class="pre">join_token</span></span></a></strong></code>, the value here will not be the token, but <code class="docutils literal notranslate"><span class="pre">VALUE_SPECIFIED_IN_NO_LOG_PARAMETER</span></code>. If you pass <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-join-token"><span class="std std-ref"><span class="pre">join_token</span></span></a></strong></code>, make sure your playbook/role does not depend on this return value!</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"SWMTKN-1--xxxxx"</span></code></p>
|
||||
</div></td>
|
||||
@@ -757,8 +757,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="return-swarm_facts/UnlockKey"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-module-return-swarm-facts-unlockkey"><strong>UnlockKey</strong></p>
|
||||
<a class="ansibleOptionLink" href="#return-swarm_facts/UnlockKey" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The swarm unlock-key if <em>autolock_managers</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> on success if <em>autolock_managers</em> is <code class="docutils literal notranslate"><span class="pre">true</span></code> and swarm is initialised, or if <em>autolock_managers</em> has changed.</p>
|
||||
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The swarm unlock-key if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-autolock-managers"><span class="std std-ref"><span class="pre">autolock_managers=true</span></span></a></code>.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> on success if <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-autolock-managers"><span class="std std-ref"><span class="pre">autolock_managers=true</span></span></a></code> and swarm is initialised, or if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-module-parameter-autolock-managers"><span class="std std-ref"><span class="pre">autolock_managers</span></span></a></strong></code> has changed.</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"SWMKEY-1-xxx"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
@@ -214,7 +214,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by Docker SDK for Python and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -226,7 +226,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -237,7 +237,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -248,7 +248,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -269,8 +269,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -285,8 +285,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-service-info-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -294,7 +294,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -302,8 +302,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-swarm-service-info-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-info-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -316,8 +316,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -341,7 +341,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -396,9 +396,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>When connecting to Docker daemon with TLS, you might need to install additional Python packages. For the Docker SDK for Python, version 2.4 or newer, this can be done by installing <code class="docutils literal notranslate"><span class="pre">docker[tls]</span></code> with <a class="reference external" href="https://docs.ansible.com/ansible/devel/collections/ansible/builtin/pip_module.html#ansible-collections-ansible-builtin-pip-module" title="(in Ansible vdevel)"><span class="xref std std-ref">ansible.builtin.pip</span></a>.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions. In general, it will use <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code> if the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CONFIG</span></code> environment variable is not specified, and use <code class="docutils literal notranslate"><span class="pre">$DOCKER_CONFIG/config.json</span></code> otherwise.</p></li>
|
||||
<li><p>This module uses the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -436,7 +436,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-service" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>A dictionary representing the current state of the service. Matches the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">inspect</span></code> output.</p>
|
||||
<p>Will be <code class="docutils literal notranslate"><span class="pre">none</span></code> if service does not exist.</p>
|
||||
<p>Will be <code class="ansible-value docutils literal notranslate"><span class="pre">none</span></code> if service does not exist.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> always</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -192,7 +192,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-volume-info-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -215,7 +215,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -227,7 +227,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -238,7 +238,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -249,7 +249,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -270,8 +270,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -288,8 +288,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-volume-info-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -297,7 +297,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -305,8 +305,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-volume-info-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-volume-info-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -319,8 +319,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -343,7 +343,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -398,7 +398,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -445,7 +445,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#return-volume" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Volume inspection results for the affected volume.</p>
|
||||
<p>Will be <code class="docutils literal notranslate"><span class="pre">none</span></code> if volume does not exist.</p>
|
||||
<p>Will be <code class="ansible-value docutils literal notranslate"><span class="pre">none</span></code> if volume does not exist.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> success</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><span class="ansible-option-sample-bold">Sample:</span> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{"CreatedAt":</span> <span class="pre">"2018-12-09T17:43:44+01:00",</span> <span class="pre">"Driver":</span> <span class="pre">"local",</span> <span class="pre">"Labels":</span> <span class="pre">null,</span> <span class="pre">"Mountpoint":</span> <span class="pre">"/var/lib/docker/volumes/ansible-test-bd3f6172/_data",</span> <span class="pre">"Name":</span> <span class="pre">"ansible-test-bd3f6172",</span> <span class="pre">"Options":</span> <span class="pre">{},</span> <span class="pre">"Scope":</span> <span class="pre">"local"}</span></code></p>
|
||||
</div></td>
|
||||
|
||||
@@ -193,7 +193,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<ul class="simple">
|
||||
<li><p>Docker API >= 1.25</p></li>
|
||||
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
|
||||
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
|
||||
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-volume-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
|
||||
<li><p>pyOpenSSL (when using TLS)</p></li>
|
||||
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
|
||||
<li><p>requests</p></li>
|
||||
@@ -216,7 +216,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
|
||||
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"auto"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -228,7 +228,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -239,7 +239,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS certificate file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -250,7 +250,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Path to the client’s TLS key file.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
|
||||
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -271,8 +271,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"unix://var/run/docker.sock"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -280,7 +280,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-driver"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-volume-module-parameter-driver"><strong>driver</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-driver" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Specify the type of volume. Docker provides the <code class="docutils literal notranslate"><span class="pre">local</span></code> driver, but 3rd party drivers can also be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Specify the type of volume. Docker provides the <code class="ansible-value docutils literal notranslate"><span class="pre">local</span></code> driver, but 3rd party drivers can also be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">"local"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -303,10 +303,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-recreate"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-volume-module-parameter-recreate"><strong>recreate</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-recreate" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Controls when a volume will be recreated when <em>state</em> is <code class="docutils literal notranslate"><span class="pre">present</span></code>. Please note that recreating an existing volume will cause <strong>any data in the existing volume to be lost!</strong> The volume will be deleted and a new volume with the same name will be created.</p>
|
||||
<p>The value <code class="docutils literal notranslate"><span class="pre">always</span></code> forces the volume to be always recreated.</p>
|
||||
<p>The value <code class="docutils literal notranslate"><span class="pre">never</span></code> makes sure the volume will not be recreated.</p>
|
||||
<p>The value <code class="docutils literal notranslate"><span class="pre">options-changed</span></code> makes sure the volume will be recreated if the volume already exist and the driver, driver options or labels differ.</p>
|
||||
<td><div class="ansible-option-cell"><p>Controls when a volume will be recreated when <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-volume-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code>. Please note that recreating an existing volume will cause <strong>any data in the existing volume to be lost!</strong> The volume will be deleted and a new volume with the same name will be created.</p>
|
||||
<p>The value <code class="ansible-value docutils literal notranslate"><span class="pre">always</span></code> forces the volume to be always recreated.</p>
|
||||
<p>The value <code class="ansible-value docutils literal notranslate"><span class="pre">never</span></code> makes sure the volume will not be recreated.</p>
|
||||
<p>The value <code class="ansible-value docutils literal notranslate"><span class="pre">options-changed</span></code> makes sure the volume will be recreated if the volume already exist and the driver, driver options or labels differ.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"always"</span></code></p></li>
|
||||
@@ -319,16 +319,16 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-volume-module-parameter-ssl-version"><strong>ssl_version</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
|
||||
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-volume-module-parameter-state"><strong>state</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p><code class="docutils literal notranslate"><span class="pre">absent</span></code> deletes the volume.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">present</span></code> creates the volume, if it does not already exist.</p>
|
||||
<td><div class="ansible-option-cell"><p><code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> deletes the volume.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> creates the volume, if it does not already exist.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"absent"</span></code></p></li>
|
||||
@@ -341,7 +341,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -349,8 +349,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-volume-module-parameter-tls"><strong>tls</strong></p>
|
||||
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-volume-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -363,8 +363,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -387,7 +387,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
@@ -449,7 +449,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul class="simple">
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
|
||||
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -227,25 +227,55 @@
|
||||
<h3>Environment variables<a class="headerlink" href="#environment-variables" title="Permalink to this heading"></a></h3>
|
||||
<p>You can also control how the plugins and modules connect to the Docker API by setting the following environment variables.</p>
|
||||
<p>For plugins, they have to be set for the environment Ansible itself runs in. For modules, they have to be set for the environment the modules are executed in. For modules running on remote machines, the environment variables have to be set on that machine for the user used to execute the modules with.</p>
|
||||
<blockquote>
|
||||
<div><dl class="simple">
|
||||
<dt>DOCKER_HOST</dt><dd><p>The URL or Unix socket path used to connect to the Docker API.</p>
|
||||
</dd>
|
||||
<dt>DOCKER_API_VERSION</dt><dd><p>The version of the Docker API running on the Docker Host. Defaults to the latest version of the API supported
|
||||
<dl class="std envvar">
|
||||
<dt class="sig sig-object std" id="envvar-DOCKER_HOST">
|
||||
<span class="sig-name descname"><span class="pre">DOCKER_HOST</span></span><a class="headerlink" href="#envvar-DOCKER_HOST" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>The URL or Unix socket path used to connect to the Docker API.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std envvar">
|
||||
<dt class="sig sig-object std" id="envvar-DOCKER_API_VERSION">
|
||||
<span class="sig-name descname"><span class="pre">DOCKER_API_VERSION</span></span><a class="headerlink" href="#envvar-DOCKER_API_VERSION" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>The version of the Docker API running on the Docker Host. Defaults to the latest version of the API supported
|
||||
by Docker SDK for Python.</p>
|
||||
</dd>
|
||||
<dt>DOCKER_TIMEOUT</dt><dd><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
</dd>
|
||||
<dt>DOCKER_CERT_PATH</dt><dd><p>Path to the directory containing the client certificate, client key and CA certificate.</p>
|
||||
</dd>
|
||||
<dt>DOCKER_SSL_VERSION</dt><dd><p>Provide a valid SSL version number.</p>
|
||||
</dd>
|
||||
<dt>DOCKER_TLS</dt><dd><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker Host.</p>
|
||||
</dd>
|
||||
<dt>DOCKER_TLS_VERIFY</dt><dd><p>Secure the connection to the API by using TLS and verify the authenticity of the Docker Host.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div></blockquote>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std envvar">
|
||||
<dt class="sig sig-object std" id="envvar-DOCKER_TIMEOUT">
|
||||
<span class="sig-name descname"><span class="pre">DOCKER_TIMEOUT</span></span><a class="headerlink" href="#envvar-DOCKER_TIMEOUT" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>The maximum amount of time in seconds to wait on a response from the API.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std envvar">
|
||||
<dt class="sig sig-object std" id="envvar-DOCKER_CERT_PATH">
|
||||
<span class="sig-name descname"><span class="pre">DOCKER_CERT_PATH</span></span><a class="headerlink" href="#envvar-DOCKER_CERT_PATH" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Path to the directory containing the client certificate, client key and CA certificate.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std envvar">
|
||||
<dt class="sig sig-object std" id="envvar-DOCKER_SSL_VERSION">
|
||||
<span class="sig-name descname"><span class="pre">DOCKER_SSL_VERSION</span></span><a class="headerlink" href="#envvar-DOCKER_SSL_VERSION" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Provide a valid SSL version number.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std envvar">
|
||||
<dt class="sig sig-object std" id="envvar-DOCKER_TLS">
|
||||
<span class="sig-name descname"><span class="pre">DOCKER_TLS</span></span><a class="headerlink" href="#envvar-DOCKER_TLS" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker Host.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std envvar">
|
||||
<dt class="sig sig-object std" id="envvar-DOCKER_TLS_HOSTNAME">
|
||||
<span class="sig-name descname"><span class="pre">DOCKER_TLS_HOSTNAME</span></span><a class="headerlink" href="#envvar-DOCKER_TLS_HOSTNAME" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>When verifying the authenticity of the Docker Host, uses this hostname to compare to the host’s certificate.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std envvar">
|
||||
<dt class="sig sig-object std" id="envvar-DOCKER_TLS_VERIFY">
|
||||
<span class="sig-name descname"><span class="pre">DOCKER_TLS_VERIFY</span></span><a class="headerlink" href="#envvar-DOCKER_TLS_VERIFY" title="Permalink to this definition"></a></dt>
|
||||
<dd><p>Secure the connection to the API by using TLS and verify the authenticity of the Docker Host.</p>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
<section id="plain-docker-daemon-images-networks-volumes-and-containers">
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user