This commit is contained in:
felixfontein
2024-12-14 21:06:57 +00:00
parent 7f5c2d282f
commit defca689b6
4 changed files with 46 additions and 20 deletions
+13 -2
View File
@@ -365,6 +365,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>You can provide a list of exporters to export the built image in various places. Note that not all exporters might be supported by the build driver used.</p>
<p>Note that depending on how this option is used, no image with name <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> and tag <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-tag"><span class="std std-ref"><span class="pre">tag</span></span></a></strong></code> might be created, which can cause the basic idempotency this module offers to not work.</p>
<p>Providing an empty list to this option is equivalent to not specifying it at all. The default behavior is a single entry with <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-outputs-type"><span class="std std-ref"><span class="pre">outputs[].type=image</span></span></a></code>.</p>
<p><strong>Note</strong> that since community.docker 4.2.0, an entry for <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code>/<code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-tag"><span class="std std-ref"><span class="pre">tag</span></span></a></strong></code> is added if <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-outputs"><span class="std std-ref"><span class="pre">outputs</span></span></a></strong></code> has at least one entry and no entry has type <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-outputs-type"><span class="std std-ref"><span class="pre">outputs[].type=image</span></span></a></code> and includes <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code>/<code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-tag"><span class="std std-ref"><span class="pre">tag</span></span></a></strong></code> in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-outputs-name"><span class="std std-ref"><span class="pre">outputs[].name</span></span></a></strong></code>. This is because the module would otherwise pass <code class="docutils literal notranslate"><span class="pre">--tag</span> <span class="pre">name:image</span></code> to the buildx plugin, which for some reason overwrites all images in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-outputs"><span class="std std-ref"><span class="pre">outputs</span></span></a></strong></code> by the <code class="docutils literal notranslate"><span class="pre">name:image</span></code> provided in <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code>/<code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-tag"><span class="std std-ref"><span class="pre">tag</span></span></a></strong></code>.</p>
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
@@ -386,11 +387,12 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</tr>
<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-outputs/name"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-build-module-parameter-outputs-name"><strong>name</strong></p>
<a class="ansibleOptionLink" href="#parameter-outputs/name" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
<a class="ansibleOptionLink" href="#parameter-outputs/name" 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=string</span></p>
</div></td>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Name under which the image is stored under.</p>
<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Name(s) under which the image is stored under.</p>
<p>If not provided, <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-name"><span class="std std-ref"><span class="pre">name</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-tag"><span class="std std-ref"><span class="pre">tag</span></span></a></strong></code> will be used.</p>
<p>Optional for <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-image-build-module-parameter-outputs-type"><span class="std std-ref"><span class="pre">outputs[].type=image</span></span></a></code>.</p>
<p>This can be a list of strings since community.docker 4.2.0.</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
@@ -694,6 +696,15 @@ Provides the secret from a given value <code class="ansible-option docutils lite
</thead>
<tbody>
<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-command"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-build-module-return-command"><strong>command</strong></p>
<a class="ansibleOptionLink" href="#return-command" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
<p><em class="ansible-option-versionadded">added in community.docker 4.2.0</em></p>
</div></td>
<td><div class="ansible-option-cell"><p>The command executed.</p>
<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success and for some failures</p>
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-image"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-image-build-module-return-image"><strong>image</strong></p>
<a class="ansibleOptionLink" href="#return-image" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
</div></td>