mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-14 03:40:33 +00:00
deploy: 024bdec919
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user