-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add yes
parameter to docker compose up
#1045
base: main
Are you sure you want to change the base?
Conversation
9da51ed
to
4bf5bd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
The integration test failures are unrelated, the nightly tests were failing as well. (This started yesterday, after the release of Docker Compose 2.33.0.)
The --yes
option was added in Compose 2.32.0 (docker/compose#12363).
plugins/modules/docker_compose_v2.py
Outdated
@@ -160,6 +160,12 @@ | |||
- When O(wait=true), wait at most this amount of seconds. | |||
type: int | |||
version_added: 3.8.0 | |||
yes: | |||
description: | |||
- When O(yes=true), pass C(--yes) to assume "yes" as answer to all prompts and run non-interactively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- When O(yes=true), pass C(--yes) to assume "yes" as answer to all prompts and run non-interactively. | |
- When O(yes=true), pass C(--yes) to assume "yes" as answer to all prompts and run non-interactively. | |
- Right now a prompt is asked whenever a non-matching volume should be re-created. O(yes=false) | |
results in the question being answered by "no", which will simply re-use the existing volume. | |
- This option is only available on Docker Compose 2.32.0 or newer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
results in the question being answered by "no"
is not quite right. It actually causes the command to hang as it waits for stdin.
plugins/modules/docker_compose_v2.py
Outdated
@@ -160,6 +160,12 @@ | |||
- When O(wait=true), wait at most this amount of seconds. | |||
type: int | |||
version_added: 3.8.0 | |||
yes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure yes
is a good option name. One problem is that "yes" is a YAML 1.1 boolean value, so it will require quoting the option to be able to use it (unless Ansible does some magic).
How about approve_questions
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a good point. Perhaps assume_yes
is a little more obvious?
Could you also add a check to |
The problem is actually Docker CLI 28.0.0, which generates some unexpected stderr output. This has been fixed in docker/cli#5854, I hope there will be a bugfix release soon. |
Docs Build 📝Thank you for contribution!✨ The docs for this PR have been published here: You can compare to the docs for the The docsite for this PR is also available for download as an artifact from this run: File changes: Click to see the diff comparison.NOTE: only file modifications are shown here. New and deleted files are excluded. diff --git a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_compose_v2_module.html b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_compose_v2_module.html
index 398c8f5..3bca4fa 100644
--- a/home/runner/work/community.docker/community.docker/docsbuild/base/docker_compose_v2_module.html
+++ b/home/runner/work/community.docker/community.docker/docsbuild/head/docker_compose_v2_module.html
@@ -233,6 +233,21 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</div></td>
</tr>
<tr class="row-odd"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="parameter-assume_yes"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-assume-yes"><strong>assume_yes</strong></p>
+<a class="ansibleOptionLink" href="#parameter-assume_yes" 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 4.5.0</em></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>When <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-assume-yes"><span class="std std-ref"><span class="pre">assume_yes=true</span></span></a></code>, pass <code class="docutils literal notranslate"><span class="pre">--yes</span></code> to assume “yes” as answer to all prompts and run non-interactively.</p>
+<p>Right now a prompt is asked whenever a non-matching volume should be re-created. <code class="ansible-option-value docutils literal notranslate"><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-assume-yes"><span class="std std-ref"><span class="pre">assume_yes=false</span></span></a></code> results in the question not being answered, which will hang as it waits for stdin.</p>
+<p>This option is only available on Docker Compose 2.32.0 or newer.</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>
+<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">true</span></code></p></li>
+</ul>
+</div></td>
+</tr>
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-build"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-build"><strong>build</strong></p>
<a class="ansibleOptionLink" href="#parameter-build" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -248,7 +263,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-ca_path"></div>
<div class="ansibleOptionAnchor" id="parameter-ca_cert"></div>
<div class="ansibleOptionAnchor" id="parameter-tls_ca_cert"></div>
@@ -260,7 +275,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>If the value is not specified in the task and the environment variable <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> is set, the file <code class="docutils literal notranslate"><span class="pre">ca.pem</span></code> from the directory specified in the environment variable <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> will be used.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-check_files_existing"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-check-files-existing"><strong>check_files_existing</strong></p>
<a class="ansibleOptionLink" href="#parameter-check_files_existing" 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 3.9.0</em></p>
@@ -274,7 +289,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-cli_context"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-cli-context"><strong>cli_context</strong></p>
<a class="ansibleOptionLink" href="#parameter-cli_context" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -282,7 +297,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-docker-host"><span class="std std-ref"><span class="pre">docker_host</span></span></a></strong></code>.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-client_cert"></div>
<div class="ansibleOptionAnchor" id="parameter-tls_client_cert"></div>
<div class="ansibleOptionAnchor" id="parameter-cert_path"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-tls-client-cert"><span id="ansible-collections-community-docker-docker-compose-v2-module-parameter-client-cert"></span><span id="ansible-collections-community-docker-docker-compose-v2-module-parameter-cert-path"></span><strong>client_cert</strong></p>
@@ -293,7 +308,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>If the value is not specified in the task and the environment variable <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> is set, the file <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> from the directory specified in the environment variable <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> will be used.</p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-client_key"></div>
<div class="ansibleOptionAnchor" id="parameter-tls_client_key"></div>
<div class="ansibleOptionAnchor" id="parameter-key_path"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-tls-client-key"><span id="ansible-collections-community-docker-docker-compose-v2-module-parameter-key-path"></span><span id="ansible-collections-community-docker-docker-compose-v2-module-parameter-client-key"></span><strong>client_key</strong></p>
@@ -304,7 +319,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>If the value is not specified in the task and the environment variable <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> is set, the file <code class="docutils literal notranslate"><span class="pre">key.pem</span></code> from the directory specified in the environment variable <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> will be used.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-definition"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-definition"><strong>definition</strong></p>
<a class="ansibleOptionLink" href="#parameter-definition" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
<p><em class="ansible-option-versionadded">added in community.docker 3.9.0</em></p>
@@ -315,7 +330,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>Note that a temporary directory will be created and deleted afterwards when using this option.</p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-dependencies"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-dependencies"><strong>dependencies</strong></p>
<a class="ansibleOptionLink" href="#parameter-dependencies" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
@@ -327,14 +342,14 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-docker_cli"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-docker-cli"><strong>docker_cli</strong></p>
<a class="ansibleOptionLink" href="#parameter-docker_cli" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
</div></td>
<td><div class="ansible-option-cell"><p>Path to the Docker CLI. If not provided, will search for Docker CLI on the <code class="xref std std-envvar docutils literal notranslate"><span class="pre">PATH</span></code>.</p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-docker_host"></div>
<div class="ansibleOptionAnchor" id="parameter-docker_url"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-docker-url"><span id="ansible-collections-community-docker-docker-compose-v2-module-parameter-docker-host"></span><strong>docker_host</strong></p>
<a class="ansibleOptionLink" href="#parameter-docker_host" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: docker_url</span></p>
@@ -345,7 +360,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-cli-context"><span class="std std-ref"><span class="pre">cli_context</span></span></a></strong></code>. If neither <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-docker-host"><span class="std std-ref"><span class="pre">docker_host</span></span></a></strong></code> nor <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-cli-context"><span class="std std-ref"><span class="pre">cli_context</span></span></a></strong></code> are provided, the value <code class="ansible-value docutils literal notranslate"><span class="pre">unix:///var/run/docker.sock</span></code> is used.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-env_files"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-env-files"><strong>env_files</strong></p>
<a class="ansibleOptionLink" href="#parameter-env_files" 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=path</span></p>
</div></td>
@@ -354,7 +369,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>The path is relative to the <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code> directory.</p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-files"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-files"><strong>files</strong></p>
<a class="ansibleOptionLink" href="#parameter-files" 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=path</span></p>
<p><em class="ansible-option-versionadded">added in community.docker 3.7.0</em></p>
@@ -364,7 +379,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code>.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-ignore_build_events"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-ignore-build-events"><strong>ignore_build_events</strong></p>
<a class="ansibleOptionLink" href="#parameter-ignore_build_events" 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 4.2.0</em></p>
@@ -379,7 +394,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-profiles"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-profiles"><strong>profiles</strong></p>
<a class="ansibleOptionLink" href="#parameter-profiles" 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>
@@ -387,7 +402,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>Equivalent to <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">compose</span> <span class="pre">--profile</span></code>.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-project_name"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-project-name"><strong>project_name</strong></p>
<a class="ansibleOptionLink" href="#parameter-project_name" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -395,7 +410,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>Required when <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code> is provided.</p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-project_src"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-project-src"><strong>project_src</strong></p>
<a class="ansibleOptionLink" href="#parameter-project_src" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">path</span></p>
</div></td>
@@ -404,7 +419,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>Mutually exclusive with <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code>. One of <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-project-src"><span class="std std-ref"><span class="pre">project_src</span></span></a></strong></code> and <code class="ansible-option docutils literal notranslate"><strong><a class="reference internal" href="#ansible-collections-community-docker-docker-compose-v2-module-parameter-definition"><span class="std std-ref"><span class="pre">definition</span></span></a></strong></code> must be provided.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-pull"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-pull"><strong>pull</strong></p>
<a class="ansibleOptionLink" href="#parameter-pull" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -422,7 +437,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-recreate"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-recreate"><strong>recreate</strong></p>
<a class="ansibleOptionLink" href="#parameter-recreate" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -437,7 +452,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-remove_images"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-remove-images"><strong>remove_images</strong></p>
<a class="ansibleOptionLink" href="#parameter-remove_images" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -449,7 +464,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-remove_orphans"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-remove-orphans"><strong>remove_orphans</strong></p>
<a class="ansibleOptionLink" href="#parameter-remove_orphans" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
@@ -461,7 +476,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-remove_volumes"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-remove-volumes"><strong>remove_volumes</strong></p>
<a class="ansibleOptionLink" href="#parameter-remove_volumes" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
@@ -473,7 +488,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-renew_anon_volumes"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-renew-anon-volumes"><strong>renew_anon_volumes</strong></p>
<a class="ansibleOptionLink" href="#parameter-renew_anon_volumes" 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 4.0.0</em></p>
@@ -487,7 +502,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-scale"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-scale"><strong>scale</strong></p>
<a class="ansibleOptionLink" href="#parameter-scale" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
<p><em class="ansible-option-versionadded">added in community.docker 3.7.0</em></p>
@@ -496,14 +511,14 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>Provide a dictionary of key/value pairs where the key is the name of the service and the value is an integer count for the number of containers.</p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-services"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-services"><strong>services</strong></p>
<a class="ansibleOptionLink" href="#parameter-services" 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-cell"><p>Specifies a subset of services to be targeted.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-state"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-state"><strong>state</strong></p>
<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>
@@ -521,14 +536,14 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-timeout"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-timeout"><strong>timeout</strong></p>
<a class="ansibleOptionLink" href="#parameter-timeout" 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>Timeout in seconds for container shutdown when attached or when containers are already running.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-tls"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-tls"><strong>tls</strong></p>
<a class="ansibleOptionLink" href="#parameter-tls" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
</div></td>
@@ -541,7 +556,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-tls_hostname"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-tls-hostname"><strong>tls_hostname</strong></p>
<a class="ansibleOptionLink" href="#parameter-tls_hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -549,7 +564,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
<p>If the value is not specified in the task, the value of environment variable <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> will be used instead. If the environment variable is not set, the default value will be used.</p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-validate_certs"></div>
<div class="ansibleOptionAnchor" id="parameter-tls_verify"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-validate-certs"><span id="ansible-collections-community-docker-docker-compose-v2-module-parameter-tls-verify"></span><strong>validate_certs</strong></p>
<a class="ansibleOptionLink" href="#parameter-validate_certs" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: tls_verify</span></p>
@@ -564,7 +579,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-wait"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-wait"><strong>wait</strong></p>
<a class="ansibleOptionLink" href="#parameter-wait" 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 3.8.0</em></p>
@@ -578,7 +593,7 @@ see <a class="reference internal" href="#ansible-collections-community-docker-do
</ul>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="parameter-wait_timeout"></div><p class="ansible-option-title" id="ansible-collections-community-docker-docker-compose-v2-module-parameter-wait-timeout"><strong>wait_timeout</strong></p>
<a class="ansibleOptionLink" href="#parameter-wait_timeout" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span></p>
<p><em class="ansible-option-versionadded">added in community.docker 3.8.0</em></p>
|
SUMMARY
Add a variable for the
docker compose up
parameteryes
to assume "yes" as answer to all prompts and run non-interactively. This prevents issues where the module hangs if a volume spec changes in the compose file.ISSUE TYPE
COMPONENT NAME
docker_compose_v2
ADDITIONAL INFORMATION