mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-17 05:10:18 +00:00
deploy: 6ae46db845
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta content="2.25.0" name="antsibull-docs" />
|
||||
<meta content="2.26.0" name="antsibull-docs" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>community.docker.docker_swarm_service module – docker swarm service — Community.Docker Collection documentation</title>
|
||||
@@ -238,7 +238,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<td><div class="ansible-option-cell"><p>List arguments to be passed to the container.</p>
|
||||
<p>Corresponds to the <code class="docutils literal notranslate"><span class="pre">ARG</span></code> parameter of <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">create</span></code>.</p>
|
||||
<p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command-as-args"><span class="std std-ref"><span class="pre">command_as_args=true</span></span></a></code>, these values are appended after <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> and both are sent as ContainerSpec.Args (matching the Docker CLI).</p>
|
||||
<p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command-as-args"><span class="std std-ref"><span class="pre">command_as_args=false</span></span></a></code> (default), <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> is sent as ContainerSpec.Args while <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> is sent as ContainerSpec.Command.</p>
|
||||
<p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command-as-args"><span class="std std-ref"><span class="pre">command_as_args=false</span></span></a></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> is sent as <code class="docutils literal notranslate"><span class="pre">ContainerSpec.Args</span></code> while <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> is sent as ContainerSpec.Command.</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -301,8 +301,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<td><div class="ansible-option-cell"><p>Command to execute when the container starts.</p>
|
||||
<p>A command may be either a string or a list or a list of strings.</p>
|
||||
<p>Corresponds to the <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> parameter of <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">create</span></code>.</p>
|
||||
<p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command-as-args"><span class="std std-ref"><span class="pre">command_as_args=false</span></span></a></code> (default), this is sent as ContainerSpec.Command, which replaces the image <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code>. This is the historical module behavior.</p>
|
||||
<p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command-as-args"><span class="std std-ref"><span class="pre">command_as_args=true</span></span></a></code>, this is combined with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> and sent as ContainerSpec.Args (same as the Docker CLI <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">create</span> <span class="pre">IMAGE</span> <span class="pre">[COMMAND]</span> <span class="pre">[ARG...]</span></code>), so the image <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code> is preserved. Use this for flag-style commands (for example <code class="docutils literal notranslate"><span class="pre">-config.file=...</span></code>) that must be passed as arguments to the image entrypoint (see <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/1044">https://github.com/ansible-collections/community.docker/issues/1044</a>).</p>
|
||||
<p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command-as-args"><span class="std std-ref"><span class="pre">command_as_args=false</span></span></a></code>, this is sent as <code class="docutils literal notranslate"><span class="pre">ContainerSpec.Command</span></code>, which replaces the image <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code>. This is the historical module behavior.</p>
|
||||
<p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command-as-args"><span class="std std-ref"><span class="pre">command_as_args=true</span></span></a></code>, this is combined with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> and sent as <code class="docutils literal notranslate"><span class="pre">ContainerSpec.Args</span></code> (same as the Docker CLI <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">create</span> <span class="pre">IMAGE</span> <span class="pre">[COMMAND]</span> <span class="pre">[ARG...]</span></code>), so the image <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code> is preserved. Use this for flag-style commands (for example <code class="ansible-value docutils literal notranslate"><span class="pre">--config.file=...</span></code>) that must be passed as arguments to the image entrypoint (see <a class="reference external" href="https://github.com/ansible-collections/community.docker/issues/1044">https://github.com/ansible-collections/community.docker/issues/1044</a>).</p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -310,10 +310,10 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-command_as_args" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
|
||||
<p><em class="ansible-option-versionadded">added in community.docker 5.3.0</em></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Controls how <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> are mapped to the service ContainerSpec.</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code> (default), <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> is written to ContainerSpec.Command and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> to ContainerSpec.Args. This matches the historical module behavior (ContainerSpec.Command replaces the image <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code>).</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> are concatenated and written only to ContainerSpec.Args, matching <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">create</span> <span class="pre">IMAGE</span> <span class="pre">[COMMAND]</span> <span class="pre">[ARG...]</span></code> so the image <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code> is preserved.</p>
|
||||
<p>The default may change to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code> in a future major release after a deprecation period.</p>
|
||||
<td><div class="ansible-option-cell"><p>Controls how <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> are mapped to the service <code class="docutils literal notranslate"><span class="pre">ContainerSpec</span></code>.</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">false</span></code> (default), <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> is written to <code class="docutils literal notranslate"><span class="pre">ContainerSpec.Command</span></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> to <code class="docutils literal notranslate"><span class="pre">ContainerSpec.Args</span></code>. This matches the historical module behavior (ContainerSpec.Command replaces the image <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code>).</p>
|
||||
<p>If <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-command"><span class="std std-ref"><span class="pre">command</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-swarm-service-module-parameter-args"><span class="std std-ref"><span class="pre">args</span></span></a></strong></code> are concatenated and written only to <code class="docutils literal notranslate"><span class="pre">ContainerSpec.Args</span></code>, matching <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">service</span> <span class="pre">create</span> <span class="pre">IMAGE</span> <span class="pre">[COMMAND]</span> <span class="pre">[ARG...]</span></code> so the image <code class="docutils literal notranslate"><span class="pre">ENTRYPOINT</span></code> is preserved.</p>
|
||||
<p>The current default will eventually be depreacted and change to <code class="ansible-value docutils literal notranslate"><span class="pre">true</span></code>.</p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><strong><span class="pre">false</span></strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
|
||||
Reference in New Issue
Block a user