mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-13 19:29:54 +00:00
deploy: d9f49fc073
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<html class="writer-html5" lang="en" >
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
<meta content="2.4.0" name="antsibull-docs" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>community.docker.docker_stack module – docker stack module — Community.Docker Collection documentation</title>
|
||||
@@ -163,6 +164,8 @@
|
||||
<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/community/docker">community.docker collection</a> (version 3.5.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>.
|
||||
You need further requirements to be able to use this module,
|
||||
see <a class="reference internal" href="#ansible-collections-community-docker-docker-stack-module-requirements"><span class="std std-ref">Requirements</span></a> for details.</p>
|
||||
@@ -194,7 +197,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</section>
|
||||
<section id="parameters">
|
||||
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Parameters</a><a class="headerlink" href="#parameters" title="Link to this heading"></a></h2>
|
||||
<table class="ansible-option-table docutils align-default" style="width: 100%">
|
||||
<table class="longtable ansible-option-table docutils align-default" style="width: 100%">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Parameter</p></th>
|
||||
<th class="head"><p>Comments</p></th>
|
||||
@@ -206,7 +209,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-absent_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-cell"><p>If larger than <code class="ansible-value docutils literal notranslate"><span class="pre">0</span></code> and <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-stack-module-parameter-state"><span class="std std-ref"><span class="pre">state=absent</span></span></a></code> the module will retry up to <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-stack-module-parameter-absent-retries"><span class="std std-ref"><span class="pre">absent_retries</span></span></a></strong></code> times to delete the stack until all the resources have been effectively deleted. If the last try still reports the stack as not completely removed the module will fail.</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">0</span></code></p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">0</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -214,7 +217,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-absent_retries_interval" 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>Interval in seconds between consecutive <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-stack-module-parameter-absent-retries"><span class="std std-ref"><span class="pre">absent_retries</span></span></a></strong></code>.</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">1</span></code></p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">1</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
@@ -222,7 +225,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-compose" 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=any</span></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>List of compose definitions. Any element may be a string referring to the path of the compose file on the target host or the YAML contents of a compose file nested as dictionary.</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">[]</span></code></p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-option-default docutils literal notranslate"><span class="pre">[]</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
@@ -237,9 +240,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-prune" 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 true will add the <code class="docutils literal notranslate"><span class="pre">--prune</span></code> option to the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">stack</span> <span class="pre">deploy</span></code> command. This will have docker remove the services not present in the current stack definition.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></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"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
<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>
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
|
||||
</ul>
|
||||
</div></td>
|
||||
@@ -249,7 +252,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-resolve_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>If set will add the <code class="docutils literal notranslate"><span class="pre">--resolve-image</span></code> option to the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">stack</span> <span class="pre">deploy</span></code> command. This will have docker query the registry to resolve image digest and supported platforms. If not set, docker use “always” by default.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></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">"always"</span></code></p></li>
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">"changed"</span></code></p></li>
|
||||
@@ -262,9 +265,9 @@ 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>Service state.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></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"><span class="pre">"present"</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
<li><p><code class="ansible-option-default-bold docutils literal notranslate"><strong><span class="pre">"present"</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">"absent"</span></code></p></li>
|
||||
</ul>
|
||||
</div></td>
|
||||
@@ -274,9 +277,9 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<a class="ansibleOptionLink" href="#parameter-with_registry_auth" 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 true will add the <code class="docutils literal notranslate"><span class="pre">--with-registry-auth</span></code> option to the <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">stack</span> <span class="pre">deploy</span></code> command. This will have docker send registry authentication details to Swarm agents.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-choices">Choices:</span></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"><span class="pre">false</span></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
|
||||
<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>
|
||||
<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
|
||||
</ul>
|
||||
</div></td>
|
||||
@@ -286,7 +289,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
</section>
|
||||
<section id="attributes">
|
||||
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Attributes</a><a class="headerlink" href="#attributes" title="Link to this heading"></a></h2>
|
||||
<table class="ansible-option-table docutils align-default" style="width: 100%">
|
||||
<table class="longtable ansible-option-table docutils align-default" style="width: 100%">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
|
||||
<th class="head"><p>Support</p></th>
|
||||
@@ -297,7 +300,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<tr class="row-even"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="attribute-check_mode"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-stack-module-attribute-check-mode"><strong>check_mode</strong></p>
|
||||
<a class="ansibleOptionLink" href="#attribute-check_mode" title="Permalink to this attribute"></a></div></td>
|
||||
<td><div class="ansible-option-cell"><p><span class="ansible-attribute-support-label">Support: </span><span class="ansible-attribute-support-none">none</span></p>
|
||||
<td><div class="ansible-option-cell"><p><strong class="ansible-attribute-support-label">Support: </strong><strong class="ansible-attribute-support-none">none</strong></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Can run in <code class="docutils literal notranslate"><span class="pre">check_mode</span></code> and return changed status prediction without modifying target.</p>
|
||||
</div></td>
|
||||
@@ -305,7 +308,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<tr class="row-odd"><td><div class="ansible-option-cell">
|
||||
<div class="ansibleOptionAnchor" id="attribute-diff_mode"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-stack-module-attribute-diff-mode"><strong>diff_mode</strong></p>
|
||||
<a class="ansibleOptionLink" href="#attribute-diff_mode" title="Permalink to this attribute"></a></div></td>
|
||||
<td><div class="ansible-option-cell"><p><span class="ansible-attribute-support-label">Support: </span><span class="ansible-attribute-support-none">none</span></p>
|
||||
<td><div class="ansible-option-cell"><p><strong class="ansible-attribute-support-label">Support: </strong><strong class="ansible-attribute-support-none">none</strong></p>
|
||||
</div></td>
|
||||
<td><div class="ansible-option-cell"><p>Will return details on what has changed (or possibly needs changing in <code class="docutils literal notranslate"><span class="pre">check_mode</span></code>), when in diff mode.</p>
|
||||
</div></td>
|
||||
@@ -345,7 +348,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<section id="return-values">
|
||||
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Return Values</a><a class="headerlink" href="#return-values" title="Link to this heading"></a></h2>
|
||||
<p>Common return values are documented <a class="reference external" href="https://docs.ansible.com/ansible/devel/reference_appendices/common_return_values.html#common-return-values" title="(in Ansible vdevel)"><span class="xref std std-ref">here</span></a>, the following are the fields unique to this module:</p>
|
||||
<table class="ansible-option-table docutils align-default" style="width: 100%">
|
||||
<table class="longtable ansible-option-table docutils align-default" style="width: 100%">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Key</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
@@ -359,8 +362,8 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
|
||||
<td><div class="ansible-option-cell"><p>dictionary containing the differences between the ‘Spec’ field
|
||||
of the stack services before and after applying the new stack
|
||||
definition.</p>
|
||||
<p class="ansible-option-line"><span class="ansible-option-returned-bold">Returned:</span> on change</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">"\"stack_spec_diff\":</span> <span class="pre">{'test_stack_test_service':</span> <span class="pre">{u'TaskTemplate':</span> <span class="pre">{u'ContainerSpec':</span> <span class="pre">{delete:</span> <span class="pre">[u'Env']}}}}\n"</span></code></p>
|
||||
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> on change</p>
|
||||
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"\"stack_spec_diff\":</span> <span class="pre">{'test_stack_test_service':</span> <span class="pre">{u'TaskTemplate':</span> <span class="pre">{u'ContainerSpec':</span> <span class="pre">{delete:</span> <span class="pre">[u'Env']}}}}\n"</span></code></p>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -373,13 +376,14 @@ definition.</p>
|
||||
</section>
|
||||
<section id="collection-links">
|
||||
<h3>Collection links<a class="headerlink" href="#collection-links" title="Link to this heading"></a></h3>
|
||||
<p class="ansible-links">
|
||||
<a href="https://github.com/ansible-collections/community.docker/issues" aria-role="button" target="_blank" rel="noopener external">Issue Tracker</a>
|
||||
<a href="https://github.com/ansible-collections/community.docker" aria-role="button" target="_blank" rel="noopener external">Repository (Sources)</a>
|
||||
<a href="https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&template=bug_report.md" aria-role="button" target="_blank" rel="noopener external">Submit a bug report</a>
|
||||
<a href="https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&template=feature_request.md" aria-role="button" target="_blank" rel="noopener external">Request a feature</a>
|
||||
<a href="./#communication-for-community-docker" aria-role="button" target="_blank">Communication</a>
|
||||
</p></section>
|
||||
<ul class="ansible-links">
|
||||
<li><span><a aria-role="button" class="ansible-link reference external" href="https://github.com/ansible-collections/community.docker/issues" rel="noopener external" target="_blank">Issue Tracker</a></span></li>
|
||||
<li><span><a aria-role="button" class="ansible-link reference external" href="https://github.com/ansible-collections/community.docker" rel="noopener external" target="_blank">Repository (Sources)</a></span></li>
|
||||
<li><span><a aria-role="button" class="ansible-link reference external" href="https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&template=bug_report.md" rel="noopener external" target="_blank">Submit a bug report</a></span></li>
|
||||
<li><span><a aria-role="button" class="ansible-link reference external" href="https://github.com/ansible-collections/community.docker/issues/new?assignees=&labels=&template=feature_request.md" rel="noopener external" target="_blank">Request a feature</a></span></li>
|
||||
<li><span><a class="reference internal" href="index.html#communication-for-community-docker"><span class="std std-ref">Communication</span></a></span></li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user