This commit is contained in:
felixfontein
2023-06-22 05:51:57 +00:00
parent 597888bb38
commit a7a857e464
33 changed files with 863 additions and 833 deletions
+40 -40
View File
@@ -192,7 +192,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<ul class="simple">
<li><p>Docker API &gt;= 1.25</p></li>
<li><p>backports.ssl_match_hostname (when using TLS on Python 2)</p></li>
<li><p>paramiko (when using SSH with <em>use_ssh_client=false</em>)</p></li>
<li><p>paramiko (when using SSH with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-use-ssh-client"><span class="std std-ref"><span class="pre">use_ssh_client=false</span></span></a></code>)</p></li>
<li><p>pyOpenSSL (when using TLS)</p></li>
<li><p>pywin32 (when using named pipes on Windows 32)</p></li>
<li><p>requests</p></li>
@@ -215,7 +215,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</div></td>
<td><div class="ansible-option-cell"><p>The version of the Docker API running on the Docker Host.</p>
<p>Defaults to the latest version of the API supported by this collection and the docker daemon.</p>
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;auto&quot;</span></code></p>
</div></td>
</tr>
@@ -223,7 +223,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-archive_path"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-archive-path"><strong>archive_path</strong></p>
<a class="ansibleOptionLink" href="#parameter-archive_path" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to archive an image to a .tar file.</p>
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to archive an image to a <code class="docutils literal notranslate"><span class="pre">.tar</span></code> file.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
@@ -260,7 +260,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<a class="ansibleOptionLink" href="#parameter-build/container_limits/cpusetcpus" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>CPUs in which to allow execution.</p>
<p>For example, <code class="docutils literal notranslate"><span class="pre">0-3</span></code> or <code class="docutils literal notranslate"><span class="pre">0,1</span></code>.</p>
<p>For example, <code class="ansible-value docutils literal notranslate"><span class="pre">0-3</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">0,1</span></code>.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
@@ -282,15 +282,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<a class="ansibleOptionLink" href="#parameter-build/container_limits/memswap" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Total memory (memory + swap).</p>
<p>Use <code class="docutils literal notranslate"><span class="pre">-1</span></code> to disable swap.</p>
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">-1</span></code> to disable swap.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-build/dockerfile"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-build-dockerfile"><strong>dockerfile</strong></p>
<a class="ansibleOptionLink" href="#parameter-build/dockerfile" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> and source <code class="docutils literal notranslate"><span class="pre">build</span></code> to provide an alternate name for the Dockerfile to use when building an image.</p>
<p>This can also include a relative path (relative to <em>path</em>).</p>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=build</span></span></a></code> to provide an alternate name for the Dockerfile to use when building an image.</p>
<p>This can also include a relative path (relative to <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-build-path"><span class="std std-ref"><span class="pre">build.path</span></span></a></strong></code>).</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
@@ -376,7 +376,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-build/use_config_proxy"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-build-use-config-proxy"><strong>use_config_proxy</strong></p>
<a class="ansibleOptionLink" href="#parameter-build/use_config_proxy" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>If set to <code class="docutils literal notranslate"><span class="pre">true</span></code> and a proxy configuration is specified in the docker client configuration (by default <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code>), the corresponding environment variables will be set in the container being built.</p>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> and a proxy configuration is specified in the docker client configuration (by default <code class="docutils literal notranslate"><span class="pre">$HOME/.docker/config.json</span></code>), the corresponding environment variables will be set in the container being built.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">false</span></code></p></li>
@@ -392,7 +392,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use a CA certificate when performing server verification by providing the path to a CA certificate file.</p>
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
@@ -403,7 +403,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Path to the clients TLS certificate file.</p>
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
@@ -414,7 +414,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Path to the clients TLS key file.</p>
<p>If the value is not specified in the task and the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code> will be used.</p>
<p>If the value is not specified in the task and the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a> will be used.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
@@ -435,8 +435,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
<p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
<td><div class="ansible-option-cell"><p>The URL or Unix socket path used to connect to the Docker API. To connect to a remote host, provide the TCP connection string. For example, <code class="ansible-value docutils literal notranslate"><span class="pre">tcp://192.0.2.23:2376</span></code>. If TLS is used to encrypt the connection, the module will automatically replace <code class="docutils literal notranslate"><span class="pre">tcp</span></code> in the connection URL with <code class="docutils literal notranslate"><span class="pre">https</span></code>.</p>
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;unix://var/run/docker.sock&quot;</span></code></p>
</div></td>
</tr>
@@ -444,7 +444,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-force_absent"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-force-absent"><strong>force_absent</strong></p>
<a class="ansibleOptionLink" href="#parameter-force_absent" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use with state <em>absent</em> to un-tag and remove all images matching the specified name.</p>
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code> to un-tag and remove all images matching the specified name.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
@@ -456,7 +456,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-force_source"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-force-source"><strong>force_source</strong></p>
<a class="ansibleOptionLink" href="#parameter-force_source" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to build, load or pull an image (depending on the value of the <em>source</em> option) when the image already exists.</p>
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to build, load or pull an image (depending on the value of the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source</span></span></a></strong></code> option) when the image already exists.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
@@ -468,7 +468,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-force_tag"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-force-tag"><strong>force_tag</strong></p>
<a class="ansibleOptionLink" href="#parameter-force_tag" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to force tagging an image.</p>
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to force tagging an image.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
@@ -480,8 +480,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-load_path"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-load-path"><strong>load_path</strong></p>
<a class="ansibleOptionLink" href="#parameter-load_path" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to load an image from a .tar file.</p>
<p>Set <em>source</em> to <code class="docutils literal notranslate"><span class="pre">load</span></code> if you want to load the image.</p>
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to load an image from a <code class="docutils literal notranslate"><span class="pre">.tar</span></code> file.</p>
<p>Set <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=load</span></span></a></code> if you want to load the image.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
@@ -489,7 +489,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<a class="ansibleOptionLink" href="#parameter-name" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Image name. Name format will be one of: <code class="docutils literal notranslate"><span class="pre">name</span></code>, <code class="docutils literal notranslate"><span class="pre">repository/name</span></code>, <code class="docutils literal notranslate"><span class="pre">registry_server:port/name</span></code>. When pushing or pulling an image the name can optionally include the tag by appending <code class="docutils literal notranslate"><span class="pre">:tag_name</span></code>.</p>
<p>Note that image IDs (hashes) are only supported for <em>state=absent</em>, for <em>state=present</em> with <em>source=load</em>, and for <em>state=present</em> with <em>source=local</em>.</p>
<p>Note that image IDs (hashes) are only supported for <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code>, for <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=load</span></span></a></code>, and for <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source=local</span></span></a></code>.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
@@ -512,7 +512,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-push"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-push"><strong>push</strong></p>
<a class="ansibleOptionLink" href="#parameter-push" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Push the image to the registry. Specify the registry as part of the <em>name</em> or <em>repository</em> parameter.</p>
<td><div class="ansible-option-cell"><p>Push the image to the registry. Specify the registry as part of the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> or <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-repository"><span class="std std-ref"><span class="pre">repository</span></span></a></strong></code> parameter.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
@@ -524,9 +524,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-repository"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-repository"><strong>repository</strong></p>
<a class="ansibleOptionLink" href="#parameter-repository" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Use with state <code class="docutils literal notranslate"><span class="pre">present</span></code> to tag the image.</p>
<p>Expects format <code class="docutils literal notranslate"><span class="pre">repository:tag</span></code>. If no tag is provided, will use the value of the <em>tag</em> parameter or <code class="docutils literal notranslate"><span class="pre">latest</span></code>.</p>
<p>If <em>push=true</em>, <em>repository</em> must either include a registry, or will be assumed to belong to the default registry (Docker Hub).</p>
<td><div class="ansible-option-cell"><p>Use with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-state"><span class="std std-ref"><span class="pre">state=present</span></span></a></code> to tag the image.</p>
<p>Expects format <code class="docutils literal notranslate"><span class="pre">repository:tag</span></code>. If no tag is provided, will use the value of the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-tag"><span class="std std-ref"><span class="pre">tag</span></span></a></strong></code> parameter or <code class="ansible-value docutils literal notranslate"><span class="pre">latest</span></code>.</p>
<p>If <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-push"><span class="std std-ref"><span class="pre">push=true</span></span></a></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-repository"><span class="std std-ref"><span class="pre">repository</span></span></a></strong></code> must either include a registry, or will be assumed to belong to the default registry (Docker Hub).</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
@@ -534,10 +534,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<a class="ansibleOptionLink" href="#parameter-source" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Determines where the module will try to retrieve the image from.</p>
<p>Use <code class="docutils literal notranslate"><span class="pre">build</span></code> to build the image from a <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>. <em>build.path</em> must be specified when this value is used.</p>
<p>Use <code class="docutils literal notranslate"><span class="pre">load</span></code> to load the image from a <code class="docutils literal notranslate"><span class="pre">.tar</span></code> file. <em>load_path</em> must be specified when this value is used.</p>
<p>Use <code class="docutils literal notranslate"><span class="pre">pull</span></code> to pull the image from a registry.</p>
<p>Use <code class="docutils literal notranslate"><span class="pre">local</span></code> to make sure that the image is already available on the local docker daemon. This means that the module does not try to build, pull or load the image.</p>
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">build</span></code> to build the image from a <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>. <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-build-path"><span class="std std-ref"><span class="pre">build.path</span></span></a></strong></code> must be specified when this value is used.</p>
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">load</span></code> to load the image from a <code class="docutils literal notranslate"><span class="pre">.tar</span></code> file. <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-load-path"><span class="std std-ref"><span class="pre">load_path</span></span></a></strong></code> must be specified when this value is used.</p>
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">pull</span></code> to pull the image from a registry.</p>
<p>Use <code class="ansible-value docutils literal notranslate"><span class="pre">local</span></code> to make sure that the image is already available on the local docker daemon. This means that the module does not try to build, pull or load the image.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;build&quot;</span></code></p></li>
@@ -551,8 +551,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-ssl_version"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-ssl-version"><strong>ssl_version</strong></p>
<a class="ansibleOptionLink" href="#parameter-ssl_version" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by ssl.py module.</p>
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code> will be used instead.</p>
<td><div class="ansible-option-cell"><p>Provide a valid SSL version number. Default value determined by <a class="reference external" href="https://docs.python.org/3/library/ssl.html">SSL Python module</a>.</p>
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a> will be used instead.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
@@ -560,8 +560,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Make assertions about the state of an image.</p>
<p>When <code class="docutils literal notranslate"><span class="pre">absent</span></code> an image will be removed. Use the force option to un-tag and remove all images matching the provided name.</p>
<p>When <code class="docutils literal notranslate"><span class="pre">present</span></code> check if an image exists using the provided name and tag. If the image is not found or the force option is used, the image will either be pulled, built or loaded, depending on the <em>source</em> option.</p>
<p>When <code class="ansible-value docutils literal notranslate"><span class="pre">absent</span></code> an image will be removed. Use the force option to un-tag and remove all images matching the provided name.</p>
<p>When <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> check if an image exists using the provided name and tag. If the image is not found or the force option is used, the image will either be pulled, built or loaded, depending on the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-source"><span class="std std-ref"><span class="pre">source</span></span></a></strong></code> option.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;absent&quot;</span></code></p></li>
@@ -573,8 +573,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-tag"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-tag"><strong>tag</strong></p>
<a class="ansibleOptionLink" href="#parameter-tag" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to <em>latest</em>.</p>
<p>If <em>name</em> parameter format is <em>name:tag</em>, then tag value from <em>name</em> will take precedence.</p>
<td><div class="ansible-option-cell"><p>Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to <code class="ansible-value docutils literal notranslate"><span class="pre">latest</span></code>.</p>
<p>If <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> parameter format is <code class="docutils literal notranslate"><span class="pre">name:tag</span></code>, then tag value from <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> will take precedence.</p>
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">&quot;latest&quot;</span></code></p>
</div></td>
</tr>
@@ -583,7 +583,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<a class="ansibleOptionLink" href="#parameter-timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>The maximum amount of time in seconds to wait on a response from the API.</p>
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p class="ansible-option-line"><span class="ansible-option-default-bold">Default:</span> <code class="ansible-option-default docutils literal notranslate"><span class="pre">60</span></code></p>
</div></td>
</tr>
@@ -591,8 +591,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-module-parameter-tls"><strong>tls</strong></p>
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <em>validate_certs</em> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS without verifying the authenticity of the Docker host server. Note that if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-module-parameter-validate-certs"><span class="std std-ref"><span class="pre">validate_certs</span></span></a></strong></code> is set to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> as well, it will take precedence.</p>
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
@@ -605,8 +605,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>When verifying the authenticity of the Docker Host server, provide the expected name of the server.</p>
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p>Note that this option had a default value <code class="docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p>Note that this option had a default value <code class="ansible-value docutils literal notranslate"><span class="pre">localhost</span></code> in older versions. It was removed in community.docker 3.0.0.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
@@ -629,7 +629,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.</p>
<p>If the value is not specified in the task, the value of environment variable <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p>If the value is not specified in the task, the value of environment variable <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> will be used instead. If the environment variable is not set, the default value will be used.</p>
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></p>
<ul class="simple">
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
@@ -684,7 +684,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>Building images is done using Docker daemons API. It is not possible to use BuildKit / buildx this way.</p></li>
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <code class="docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code>, <code class="docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
<li><p>Connect to the Docker daemon by providing parameters with each task or by defining environment variables. You can define <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_HOST"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_HOST</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_HOSTNAME"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_HOSTNAME</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_API_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_API_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_CERT_PATH"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_CERT_PATH</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_SSL_VERSION"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_SSL_VERSION</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS</span></code></a>, <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TLS_VERIFY"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TLS_VERIFY</span></code></a> and <a class="reference internal" href="docsite/scenario_guide.html#envvar-DOCKER_TIMEOUT"><code class="xref std std-envvar docutils literal notranslate"><span class="pre">DOCKER_TIMEOUT</span></code></a>. If you are using docker machine, run the script shipped with the product that sets up the environment. It will set these variables for you. See <a class="reference external" href="https://docs.docker.com/machine/reference/env/">https://docs.docker.com/machine/reference/env/</a> for more details.</p></li>
<li><p>This module does <strong>not</strong> use the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">Docker SDK for Python</a> to communicate with the Docker daemon. It uses code derived from the Docker SDK or Python that is included in this collection.</p></li>
</ul>
</div>