This commit is contained in:
felixfontein
2023-12-10 08:57:33 +00:00
parent 6470c8ab0c
commit 80502d2762
40 changed files with 487 additions and 460 deletions
+16 -15
View File
@@ -1,15 +1,17 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta content="2.5.0" name="antsibull-docs" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta content="2.6.0" name="antsibull-docs" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>community.docker.docker_container module manage Docker containers &mdash; Community.Docker Collection documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/ansible.css" type="text/css" />
<link rel="stylesheet" href="_static/antsibull-minimal.css" type="text/css" />
<link rel="stylesheet" href="_static/css/rtd-ethical-ads.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=5707b69d" />
<link rel="stylesheet" type="text/css" href="_static/css/ansible.css?v=c5b67dd2" />
<link rel="stylesheet" type="text/css" href="_static/antsibull-minimal.css" />
<link rel="stylesheet" type="text/css" href="_static/css/rtd-ethical-ads.css?v=289b023e" />
<link rel="shortcut icon" href="_static/images/Ansible-Mark-RGB_Black.png"/>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
@@ -34,11 +36,9 @@
<div class="DocSite-globalNav ansibleNav">
<ul>
<li><a href="https://www.ansible.com/ansiblefest" target="_blank">AnsibleFest</a></li>
<li><a href="https://www.ansible.com/tower" target="_blank">Products</a></li>
<li><a href="https://www.ansible.com/community" target="_blank">Community</a></li>
<li><a href="https://www.ansible.com/webinars-training" target="_blank">Webinars & Training</a></li>
<li><a href="https://www.ansible.com/blog" target="_blank">Blog</a></li>
<li><a href="https://forum.ansible.com/" target="_blank">Ansible community forum</a></li>
<li><a href="https://docs.ansible.com/" target="_blank">Documentation</a></li>
</ul>
</div>
@@ -164,7 +164,7 @@
<h1>community.docker.docker_container module manage Docker containers<a class="headerlink" href="#community-docker-docker-container-module-manage-docker-containers" title="Link to this heading"></a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This module is part of the <a class="reference external" href="https://galaxy.ansible.com/ui/repo/published/community/docker/">community.docker collection</a> (version 3.5.0).</p>
<p>This module is part of the <a class="reference external" href="https://galaxy.ansible.com/ui/repo/published/community/docker/">community.docker collection</a> (version 3.6.0).</p>
<p>It is not included in <code class="docutils literal notranslate"><span class="pre">ansible-core</span></code>.
To check whether it is installed, run <code class="code docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">list</span></code>.</p>
<p>To install it, use: <code class="code docutils literal notranslate"><span class="pre">ansible-galaxy</span> <span class="pre">collection</span> <span class="pre">install</span> <span class="pre">community.docker</span></code>.
@@ -825,11 +825,12 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<td><div class="ansible-option-cell"><p>Determines what the module does if the image matches, but the image name in the containers 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 <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>If set to <code class="ansible-value docutils literal notranslate"><span class="pre">ignore</span></code> (currently the default) 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>Since community.docker 3.5.0, the default <code class="ansible-value docutils literal notranslate"><span class="pre">ignore</span></code> has been deprecated. If not specified, a deprecation warning will be emitted if this setting would make a difference. The default will change to <code class="ansible-value docutils literal notranslate"><span class="pre">recreate</span></code> in community.docker 4.0.0.</p>
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
<ul class="simple">
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;recreate&quot;</span></code></p></li>
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><strong><span class="pre">&quot;ignore&quot;</span></strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ignore&quot;</span></code></p></li>
</ul>
</div></td>
</tr>
@@ -1239,7 +1240,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p><em class="ansible-option-versionadded">added in community.docker 3.0.0</em></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 <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>
<p>Note that since community.docker 3.5.0, the module uses both the images metadata and the Docker daemons information to normalize platform strings similarly to how Docker itself is doing this. If you notice idempotency problems, <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/new?assignees=&amp;labels=&amp;projects=&amp;template=bug_report.md">please create an issue in the community.docker GitHub repository</a>. For older community.docker versions, 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 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">