mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-18 04:48:46 +00:00
deploy: ec37166a6c
This commit is contained in:
parent
dbe3b351a8
commit
ccf5d23ded
@ -1506,7 +1506,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<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">healthy</span></code> - Asserts that the container is <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> and <code class="ansible-value docutils literal notranslate"><span class="pre">started</span></code>, and is actually healthy as well. The time waited can be controlled with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-healthy-wait-timeout"><span class="std std-ref"><span class="pre">healthy_wait_timeout</span></span></a></strong></code>. This state has been added in community.docker 3.11.0.</p>
|
||||
<p><code class="ansible-value docutils literal notranslate"><span class="pre">healthy</span></code> - Asserts that the container is <code class="ansible-value docutils literal notranslate"><span class="pre">present</span></code> and <code class="ansible-value docutils literal notranslate"><span class="pre">started</span></code>, and is actually healthy as well. This means that the conditions defined in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-healthcheck"><span class="std std-ref"><span class="pre">healthcheck</span></span></a></strong></code> respectively in the image’s <code class="docutils literal notranslate"><span class="pre">HEALTHCHECK</span></code> (<a class="reference external" href="https://docs.docker.com/reference/dockerfile/#healthcheck">Docker reference for HEALTHCHECK</a>) are satisfied. The time waited can be controlled with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-container-module-parameter-healthy-wait-timeout"><span class="std std-ref"><span class="pre">healthy_wait_timeout</span></span></a></strong></code>. This state has been added in community.docker 3.11.0.</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>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user