This commit is contained in:
felixfontein 2024-10-04 08:18:56 +00:00
parent d9eff3a4e4
commit 39d079e8a6
4 changed files with 31 additions and 8 deletions

View File

@ -197,7 +197,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Reads inventories from the Docker API.</p></li>
<li><p>Uses a YAML configuration file that ends with <code class="docutils literal notranslate"><span class="pre">docker.[yml|yaml]</span></code>.</p></li>
<li><p>Uses a YAML configuration file that ends with <code class="ansible-value docutils literal notranslate"><span class="pre">docker.(yml|yaml)</span></code>.</p></li>
</ul>
</section>
<section id="requirements">
@ -621,6 +621,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>The configuration file must be a YAML file whose filename ends with <code class="ansible-value docutils literal notranslate"><span class="pre">docker.yml</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">docker.yaml</span></code>. Other filenames will not be accepted.</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>

View File

@ -132,6 +132,7 @@
<li class="toctree-l2"><a class="reference internal" href="#synopsis">Synopsis</a></li>
<li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="#parameters">Parameters</a></li>
<li class="toctree-l2"><a class="reference internal" href="#notes">Notes</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#authors">Authors</a></li>
<li class="toctree-l3"><a class="reference internal" href="#collection-links">Collection links</a></li>
@ -187,14 +188,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<li><p><a class="reference internal" href="#synopsis" id="id1">Synopsis</a></p></li>
<li><p><a class="reference internal" href="#requirements" id="id2">Requirements</a></p></li>
<li><p><a class="reference internal" href="#parameters" id="id3">Parameters</a></p></li>
<li><p><a class="reference internal" href="#examples" id="id4">Examples</a></p></li>
<li><p><a class="reference internal" href="#notes" id="id4">Notes</a></p></li>
<li><p><a class="reference internal" href="#examples" id="id5">Examples</a></p></li>
</ul>
</nav>
<section id="synopsis">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Get inventory hosts from Docker Machine.</p></li>
<li><p>Uses a YAML configuration file that ends with docker_machine.(yml|yaml).</p></li>
<li><p>Uses a YAML configuration file that ends with <code class="ansible-value docutils literal notranslate"><span class="pre">docker_machine.(yml|yaml)</span></code>.</p></li>
<li><p>The plugin sets standard host variables <code class="docutils literal notranslate"><span class="pre">ansible_host</span></code>, <code class="docutils literal notranslate"><span class="pre">ansible_port</span></code>, <code class="docutils literal notranslate"><span class="pre">ansible_user</span></code> and <code class="docutils literal notranslate"><span class="pre">ansible_ssh_private_key</span></code>.</p></li>
<li><p>The plugin stores the Docker Machine env output variables in <code class="docutils literal notranslate"><span class="pre">dm_</span></code> prefixed host variables.</p></li>
</ul>
@ -429,8 +431,17 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</tbody>
</table>
</section>
<section id="notes">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Notes</a><a class="headerlink" href="#notes" title="Link to this heading"></a></h2>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>The configuration file must be a YAML file whose filename ends with <code class="ansible-value docutils literal notranslate"><span class="pre">docker_machine.yml</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">docker_machine.yaml</span></code>. Other filenames will not be accepted.</p></li>
</ul>
</div>
</section>
<section id="examples">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Examples</a><a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Examples</a><a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
<div class="highlight-yaml+jinja notranslate"><div class="highlight"><pre><span></span><span class="c1"># Minimal example</span>
<span class="nt">plugin</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">community.docker.docker_machine</span>

View File

@ -132,6 +132,7 @@
<li class="toctree-l2"><a class="reference internal" href="#synopsis">Synopsis</a></li>
<li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="#parameters">Parameters</a></li>
<li class="toctree-l2"><a class="reference internal" href="#notes">Notes</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#authors">Authors</a></li>
<li class="toctree-l3"><a class="reference internal" href="#collection-links">Collection links</a></li>
@ -186,14 +187,15 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<li><p><a class="reference internal" href="#synopsis" id="id1">Synopsis</a></p></li>
<li><p><a class="reference internal" href="#requirements" id="id2">Requirements</a></p></li>
<li><p><a class="reference internal" href="#parameters" id="id3">Parameters</a></p></li>
<li><p><a class="reference internal" href="#examples" id="id4">Examples</a></p></li>
<li><p><a class="reference internal" href="#notes" id="id4">Notes</a></p></li>
<li><p><a class="reference internal" href="#examples" id="id5">Examples</a></p></li>
</ul>
</nav>
<section id="synopsis">
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Synopsis</a><a class="headerlink" href="#synopsis" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p>Reads inventories from the Docker swarm API.</p></li>
<li><p>Uses a YAML configuration file docker_swarm.[yml|yaml].</p></li>
<li><p>Uses a YAML configuration file that ends with <code class="ansible-value docutils literal notranslate"><span class="pre">docker_swarm.(yml|yaml)</span></code>.</p></li>
<li><p>The plugin returns following groups of swarm nodes: <code class="docutils literal notranslate"><span class="pre">all</span></code> - all hosts; <code class="docutils literal notranslate"><span class="pre">workers</span></code> - all worker nodes; <code class="docutils literal notranslate"><span class="pre">managers</span></code> - all manager nodes; <code class="docutils literal notranslate"><span class="pre">leader</span></code> - the swarm leader node; <code class="docutils literal notranslate"><span class="pre">nonleaders</span></code> - all nodes except the swarm leader.</p></li>
</ul>
</section>
@ -536,8 +538,17 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</tbody>
</table>
</section>
<section id="notes">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Notes</a><a class="headerlink" href="#notes" title="Link to this heading"></a></h2>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>The configuration file must be a YAML file whose filename ends with <code class="ansible-value docutils literal notranslate"><span class="pre">docker_swarm.yml</span></code> or <code class="ansible-value docutils literal notranslate"><span class="pre">docker_swarm.yaml</span></code>. Other filenames will not be accepted.</p></li>
</ul>
</div>
</section>
<section id="examples">
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Examples</a><a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
<h2><a class="toc-backref" href="#id5" role="doc-backlink">Examples</a><a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
<div class="highlight-yaml+jinja notranslate"><div class="highlight"><pre><span></span><span class="c1"># Minimal example using local docker</span>
<span class="nt">plugin</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">community.docker.docker_swarm</span>
<span class="nt">docker_host</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">unix:///var/run/docker.sock</span>

File diff suppressed because one or more lines are too long