Skip to content

ecs_taskdefinition: add inactive/absent states, fix list element comparison bug - #2410

Open
jonpspri wants to merge 5 commits into
ansible-collections:mainfrom
jonpspri:ecs_taskdefinition
Open

ecs_taskdefinition: add inactive/absent states, fix list element comparison bug#2410
jonpspri wants to merge 5 commits into
ansible-collections:mainfrom
jonpspri:ecs_taskdefinition

Conversation

@jonpspri

@jonpspri jonpspri commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #2023

  • Add state=inactive to deregister task definitions (mark INACTIVE) without deleting them.
  • Add state=absent with family-only support to permanently delete all revisions in a family (both ACTIVE and INACTIVE).
  • Fix bug in _right_has_values_of_left where list element mismatches silently fell through without returning False, causing false-positive idempotency matches.
  • Fix invalid status="ALL" parameter passed to ListTaskDefinitions API — refactor describe_task_definitions to accept a list of status values.
  • Extract _right_has_values_of_left to module level for testability and add docstring documenting matching behavior.
  • Simplify linuxParameters and capabilities suboption docs (remove overly restrictive choices that lag behind AWS API).
  • Make containers parameter optional (not required for state=inactive/absent).
  • Add unit tests for _right_has_values_of_left covering scalar matching, list ordering, port mapping protocol defaults, essential key default, and the list element mismatch regression.
  • Add integration tests for family-wide deletion including idempotency.

Test plan

  • Unit tests pass: ansible-test units --docker default tests/unit/plugins/modules/test_ecs_taskdefinition.py
  • Integration tests pass: ansible-test integration ecs_cluster (requires AWS credentials)

…finitions status param

- Move _right_has_values_of_left from nested function inside main() to
  module level so it can be imported for unit testing.
- Add docstring documenting the function's matching behavior.
- Fix invalid status="ALL" in family-delete codepath — AWS
  ListTaskDefinitions only accepts ACTIVE, INACTIVE, or
  DELETE_IN_PROGRESS.
- Refactor describe_task_definitions to accept a list of status values,
  extracting pagination into _list_task_definition_arns.
- Add unit tests for _right_has_values_of_left covering scalar matching,
  list ordering, port mapping protocol defaults, essential key default,
  and the list element mismatch regression case.
Copilot AI review requested due to automatic review settings February 7, 2026 19:35
@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown

Docs Build 📝

Thank you for contribution!✨

The docsite for this PR is available for download as an artifact from this run:
https://github.com/ansible-collections/community.aws/actions/runs/21949871555

You can compare to the docs for the main branch here:
https://ansible-collections.github.io/community.aws/branch/main

File changes:

  • M collections/community/aws/ecs_taskdefinition_module.html
Click to see the diff comparison.

NOTE: only file modifications are shown here. New and deleted files are excluded.
See the file list and check the published docs to see those files.

The diff output was truncated because it exceeded the maximum size.

diff --git a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/ecs_taskdefinition_module.html b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/ecs_taskdefinition_module.html
index a0a83e8..e487b44 100644
--- a/home/runner/work/community.aws/community.aws/docsbuild/base/collections/community/aws/ecs_taskdefinition_module.html
+++ b/home/runner/work/community.aws/community.aws/docsbuild/head/collections/community/aws/ecs_taskdefinition_module.html
@@ -156,7 +156,7 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 <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>Registers or deregisters task definitions in the Amazon Web Services (AWS) EC2 Container Service (ECS).</p></li>
+<li><p>Registers, deregisters, or deletes task definitions in the Amazon Web Services (AWS) EC2 Container Service (ECS).</p></li>
 </ul>
 </section>
 <section id="requirements">
@@ -216,7 +216,7 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 </tr>
 <tr class="row-even"><td><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers"><strong>containers</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers" 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=dictionary</span> / <span class="ansible-option-required">required</span></p>
+<a class="ansibleOptionLink" href="#parameter-containers" 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=dictionary</span></p>
 </div></td>
 <td><div class="ansible-option-cell"><p>A list of containers definitions.</p>
 <p>See <a class="reference external" href="https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html">https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html</a> for a complete list of parameters.</p>
@@ -244,27 +244,6 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 <p>When a dependency is defined for container startup, for container shutdown it is reversed.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/dependsOn/condition"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-dependson-condition"><strong>condition</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/dependsOn/condition" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The dependency condition of the container.</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">&quot;start&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;complete&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;success&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;healthy&quot;</span></code></p></li>
-</ul>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/dependsOn/containerName"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-dependson-containername"><strong>containerName</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/dependsOn/containerName" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The name of a container.</p>
-</div></td>
-</tr>
 <tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/disableNetworking"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-disablenetworking"><strong>disableNetworking</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/disableNetworking" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
@@ -377,20 +356,6 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 <p>This parameter is not supported for Windows containers or tasks that use <em>network_mode=awsvpc</em>.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/extraHosts/hostname"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-extrahosts-hostname"><strong>hostname</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/extraHosts/hostname" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The hostname to use in the /etc/hosts entry.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/extraHosts/ipAddress"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-extrahosts-ipaddress"><strong>ipAddress</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/extraHosts/ipAddress" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The IP address to use in the /etc/hosts entry.</p>
-</div></td>
-</tr>
 <tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/firelensConfiguration"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-firelensconfiguration"><strong>firelensConfiguration</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/firelensConfiguration" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
@@ -399,28 +364,6 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 <p>This is used to specify and configure a log router for container logs.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/firelensConfiguration/options"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-firelensconfiguration-options"><strong>options</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/firelensConfiguration/options" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The options to use when configuring the log router.</p>
-<p>This field is optional and can be used to specify a custom configuration file or to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event.</p>
-<p>If specified, the syntax to use is <code class="docutils literal notranslate"><span class="pre">{&quot;enable-ecs-log-metadata&quot;:&quot;true|false&quot;,&quot;config-file-type:&quot;s3|file&quot;,&quot;config-file-value&quot;:&quot;arn:aws:s3:::mybucket/fluent.conf|filepath&quot;}</span></code>.</p>
-<p>For more information, see <a class="reference external" href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef">https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef</a>.</p>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/firelensConfiguration/type"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-firelensconfiguration-type"><strong>type</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/firelensConfiguration/type" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The log router to use. The valid values are <code class="docutils literal notranslate"><span class="pre">fluentd</span></code> or <code class="docutils literal notranslate"><span class="pre">fluentbit</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-choices-entry docutils literal notranslate"><span class="pre">&quot;fluentd&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;fluentbit&quot;</span></code></p></li>
-</ul>
-</div></td>
-</tr>
 <tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/healthCheck"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-healthcheck"><strong>healthCheck</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/healthCheck" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
@@ -428,52 +371,7 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The health check command and associated configuration parameters for the container.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/healthCheck/command"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-healthcheck-command"><strong>command</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/healthCheck/command" 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-indent-desc"></div><div class="ansible-option-cell"><p>A string array representing the command that the container runs to determine if it is healthy.</p>
-<p>The string array must start with CMD to run the command arguments directly, or CMD-SHELL to run the command with the container’s default shell.</p>
-<p>An exit code of 0 indicates success, and non-zero exit code indicates failure.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/healthCheck/interval"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-healthcheck-interval"><strong>interval</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/healthCheck/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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The time period in seconds between each health check execution.</p>
-<p>You may specify between 5 and 300 seconds. The default value is 30 seconds.</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">30</span></code></p>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/healthCheck/retries"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-healthcheck-retries"><strong>retries</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/healthCheck/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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The number of times to retry a failed health check before the container is considered unhealthy.</p>
-<p>You may specify between 1 and 10 retries. The default value is 3.</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">3</span></code></p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/healthCheck/startPeriod"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-healthcheck-startperiod"><strong>startPeriod</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/healthCheck/startPeriod" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries.</p>
-<p>You can specify between 0 and 300 seconds. By default, the startPeriod is disabled.</p>
-<p>Note: If a health check succeeds within the startPeriod, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.</p>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/healthCheck/timeout"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-healthcheck-timeout"><strong>timeout</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/healthCheck/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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The time period in seconds to wait for a health check to succeed before it is considered a failure.</p>
-<p>You may specify between 2 and 60 seconds. The default value is 5.</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">5</span></code></p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/hostname"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-hostname"><strong>hostname</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/hostname" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
 </div></td>
@@ -481,14 +379,14 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 <p>This parameter is not supported if <em>network_mode=awsvpc</em>.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/image"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-image"><strong>image</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/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-indent-desc"></div><div class="ansible-option-cell"><p>The image used to start a container.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/interactive"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-interactive"><strong>interactive</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/interactive" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">boolean</span></p>
 </div></td>
@@ -500,7 +398,7 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 </ul>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/links"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-links"><strong>links</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/links" 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>
@@ -508,253 +406,13 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 <p>This parameter is only supported if <em>network_mode=bridge</em>.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters"><strong>linuxParameters</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/linuxParameters" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
 </div></td>
 <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/capabilities"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-capabilities"><strong>capabilities</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/capabilities" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/capabilities/add"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-capabilities-add"><strong>add</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/capabilities/add" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The Linux capabilities for the container that have been added to the default configuration provided by Docker.</p>
-<p>If <em>launch_type=FARGATE</em>, this parameter is not supported.</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">&quot;ALL&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;AUDIT_CONTROL&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;AUDIT_WRITE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;BLOCK_SUSPEND&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;CHOWN&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;DAC_OVERRIDE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;DAC_READ_SEARCH&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;FOWNER&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;FSETID&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;IPC_LOCK&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;IPC_OWNER&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;KILL&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;LEASE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;LINUX_IMMUTABLE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;MAC_ADMIN&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;MAC_OVERRIDE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;MKNOD&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;NET_ADMIN&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;NET_BIND_SERVICE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;NET_BROADCAST&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;NET_RAW&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SETFCAP&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SETGID&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SETPCAP&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SETUID&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_ADMIN&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_BOOT&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_CHROOT&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_MODULE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_NICE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_PACCT&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_PTRACE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_RAWIO&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_RESOURCE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_TIME&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_TTY_CONFIG&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYSLOG&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;WAKE_ALARM&quot;</span></code></p></li>
-</ul>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/capabilities/drop"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-capabilities-drop"><strong>drop</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/capabilities/drop" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The Linux capabilities for the container that have been removed from the default configuration provided by Docker.</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">&quot;ALL&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;AUDIT_CONTROL&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;AUDIT_WRITE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;BLOCK_SUSPEND&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;CHOWN&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;DAC_OVERRIDE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;DAC_READ_SEARCH&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;FOWNER&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;FSETID&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;IPC_LOCK&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;IPC_OWNER&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;KILL&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;LEASE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;LINUX_IMMUTABLE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;MAC_ADMIN&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;MAC_OVERRIDE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;MKNOD&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;NET_ADMIN&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;NET_BIND_SERVICE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;NET_BROADCAST&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;NET_RAW&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SETFCAP&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SETGID&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SETPCAP&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SETUID&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_ADMIN&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_BOOT&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_CHROOT&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_MODULE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_NICE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_PACCT&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_PTRACE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_RAWIO&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_RESOURCE&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_TIME&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYS_TTY_CONFIG&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;SYSLOG&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;WAKE_ALARM&quot;</span></code></p></li>
-</ul>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/devices"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-devices"><strong>devices</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/devices" 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=dictionary</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Any host devices to expose to the container.</p>
-<p>If <em>launch_type=FARGATE</em>, this parameter is not supported.</p>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/devices/containerPath"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-devices-containerpath"><strong>containerPath</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/devices/containerPath" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The path inside the container at which to expose the host device.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/devices/hostPath"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-devices-hostpath"><strong>hostPath</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/devices/hostPath" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The path for the device on the host container instance.</p>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/devices/permissions"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-devices-permissions"><strong>permissions</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/devices/permissions" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The explicit permissions to provide to the container for the device.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/initProcessEnabled"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-initprocessenabled"><strong>initProcessEnabled</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/initProcessEnabled" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>Run an init process inside the container that forwards signals and reaps processes.</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">false</span></code></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-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/maxSwap"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-maxswap"><strong>maxSwap</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/maxSwap" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The total amount of swap memory (in MiB) a container can use.</p>
-<p>If <em>launch_type=FARGATE</em>, this parameter is not supported.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/sharedMemorySize"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-sharedmemorysize"><strong>sharedMemorySize</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/sharedMemorySize" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The value for the size (in MiB) of the /dev/shm volume.</p>
-<p>If <em>launch_type=FARGATE</em>, this parameter is not supported.</p>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/swappiness"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-swappiness"><strong>swappiness</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/swappiness" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>This allows you to tune a container’s memory swappiness behavior.</p>
-<p>If <em>launch_type=FARGATE</em>, this parameter is not supported.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/tmpfs"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-tmpfs"><strong>tmpfs</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/tmpfs" 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=dictionary</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The container path, mount options, and size (in MiB) of the tmpfs mount.</p>
-<p>If <em>launch_type=FARGATE</em>, this parameter is not supported.</p>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/tmpfs/containerPath"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-tmpfs-containerpath"><strong>containerPath</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/tmpfs/containerPath" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span> / <span class="ansible-option-required">required</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The absolute file path where the tmpfs volume is to be mounted.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/tmpfs/mountOptions"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-tmpfs-mountoptions"><strong>mountOptions</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/tmpfs/mountOptions" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The list of tmpfs volume mount options.</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">&quot;defaults&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;ro&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;rw&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;suid&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;nosuid&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;dev&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;nodev&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;exec&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;noexec&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;sync&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;async&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;dirsync&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;remount&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;mand&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;nomand&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;atime&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;noatime&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;diratime&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;nodiratime&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;bind&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;rbind&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;unbindable&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;runbindable&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;private&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;rprivate&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;shared&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;rshared&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;slave&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;rslave&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;relatime&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;norelatime&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;strictatime&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;nostrictatime&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;mode&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;uid&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;gid&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;nr_inodes&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;nr_blocks&quot;</span></code></p></li>
-<li><p><code class="ansible-option-choices-entry docutils literal notranslate"><span class="pre">&quot;mpol&quot;</span></code></p></li>
-</ul>
-</div></td>
-</tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/linuxParameters/tmpfs/size"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-linuxparameters-tmpfs-size"><strong>size</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/linuxParameters/tmpfs/size" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">integer</span> / <span class="ansible-option-required">required</span></p>
-</div></td>
-<td><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The size (in MiB) of the tmpfs volume.</p>
-</div></td>
-</tr>
 <tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/logConfiguration"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-logconfiguration"><strong>logConfiguration</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/logConfiguration" title="Permalink to this option"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
@@ -762,44 +420,35 @@ see <a class="reference internal" href="#ansible-collections-community-aws-ecs-t
 <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The log configuration specification for the container.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
-<div class="ansibleOptionAnchor" id="parameter-containers/logConfiguration/logDriver"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-logconfiguration-logdriver"><strong>logDriver</strong></p>
-<a class="ansibleOptionLink" href="#parameter-containers/logConfiguration/logDriver" 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-indent-desc"></div><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The log driver to use for the container.</p>
-<p>For tasks on AWS Fargate, the supported log drivers are <code class="docutils literal notranslate"><span class="pre">awslogs</span></code>, <code class="docutils literal notranslate"><span class="pre">splunk</span></code>, and <code class="docutils literal notranslate"><span class="pre">awsfirelens</span></code>.</p>
-<p>For tasks hosted on Amazon EC2 instances, the supported log drivers are <code class="docutils literal notranslate"><span class="pre">awslogs</span></code>, <code class="docutils literal notranslate"><span class="pre">fluentd</span></code>, <code class="docutils literal notranslate"><span class="pre">gelf</span></code>, <code class="docutils literal notranslate"><span class="pre">json-file</span></code>, <code class="docutils literal notranslate"><span class="pre">journald</span></code>, <code class="docutils literal notranslate"><span class="pre">logentries</span></code>, <code class="docutils literal notranslate"><span class="pre">syslog</span></code>, <code class="docutils literal notranslate"><span class="pre">splunk</span></code>, and <code class="docutils literal notranslate"><span class="pre">awsfirelens</span></code>.</p>
-</div></td>
-</tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/memory"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-memory"><strong>memory</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/memory" 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-indent-desc"></div><div class="ansible-option-cell"><p>The amount (in MiB) of memory to present to the container.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/memoryReservation"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-memoryreservation"><strong>memoryReservation</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/memoryReservation" 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-indent-desc"></div><div class="ansible-option-cell"><p>The soft limit (in MiB) of memory to reserve for the container.</p>
 </div></td>
 </tr>
-<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/mountPoints"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-mountpoints"><strong>mountPoints</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/mountPoints" 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=dictionary</span></p>
 </div></td>
 <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell"><p>The mount points for data volumes in your container.</p>
 </div></td>
 </tr>
-<tr class="row-even"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-indent"></div><div class="ansible-option-indent"></div><div class="ansible-option-cell">
 <div class="ansibleOptionAnchor" id="parameter-containers/mountPoints/containerPath"></div><p class="ansible-option-title" id="ansible-collections-community-aws-ecs-taskdefinition-module-parameter-containers-mountpoints-containerpath"><strong>containerPath</strong></p>
 <a class="ansibleOptionLink" href="#parameter-containers/mountPoints/containerPath" title="Permalink to thi

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends the ecs_taskdefinition Ansible module to support additional lifecycle states (deregister vs permanent delete) and improves task-definition matching/idempotency logic, with accompanying unit and integration tests.

Changes:

  • Add state=inactive (deregister / mark INACTIVE) and extend state=absent to support permanent deletion, including family-wide deletion of all revisions.
  • Refactor task-definition listing/description to support multiple status filters and remove invalid status="ALL" usage.
  • Extract and test _right_has_values_of_left to fix a list-element mismatch regression and improve testability.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
plugins/modules/ecs_taskdefinition.py Implements new states, adds delete support, refactors listing by status, and extracts matching helper + docs updates.
tests/unit/plugins/modules/test_ecs_taskdefinition.py Adds unit coverage for _right_has_values_of_left, including the list-element mismatch regression.
tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml Adds integration coverage for family-wide deletion and idempotency.
tests/integration/targets/ecs_cluster/tasks/99_terminate_everything.yml Adds cleanup for the new family-delete integration test resources.
Comments suppressed due to low confidence (1)

plugins/modules/ecs_taskdefinition.py:452

  • The RETURN docs say taskdefinition is returned "always", but the new family-only state=absent path returns taskdefinitions (list) and exits without setting taskdefinition. Please update RETURN documentation (and/or always include a consistent key) so module outputs are accurately documented.
RETURN = r"""
taskdefinition:
    description: a reflection of the input parameters
    type: dict
    returned: always
"""

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/modules/ecs_taskdefinition.py
Comment thread plugins/modules/ecs_taskdefinition.py Outdated
Comment thread plugins/modules/ecs_taskdefinition.py
Comment thread plugins/modules/ecs_taskdefinition.py
Comment thread tests/unit/plugins/modules/test_ecs_taskdefinition.py Outdated
@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/6d8937b8ef7349608b4f883787769bc2

✔️ ansible-galaxy-importer SUCCESS in 4m 47s (non-voting)
✔️ build-ansible-collection SUCCESS in 11m 48s
✔️ ansible-test-splitter SUCCESS in 4m 44s
integration-community.aws-1 FAILURE in 13m 04s
Skipped 21 jobs

…nitions

The module returns different keys depending on the operation:
- taskdefinition (singular) for state=present, state=inactive, or single-revision state=absent
- taskdefinitions (plural) for family-wide state=absent deletion

Addresses Copilot review comment about inconsistent return documentation.

@jonpspri jonpspri left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/f218dad4453e41dcb97a10f60b556764

✔️ ansible-galaxy-importer SUCCESS in 5m 19s (non-voting)
✔️ build-ansible-collection SUCCESS in 11m 07s
✔️ ansible-test-splitter SUCCESS in 4m 16s
integration-community.aws-1 FAILURE in 16m 17s
Skipped 21 jobs

@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/3c45868e3df24ea685f9eedb7aa8e6d9

⚠️ ansible-galaxy-importer SKIPPED Skipped due to failed job build-ansible-collection (non-voting)
build-ansible-collection POST_FAILURE in 11m 04s
ansible-test-splitter POST_FAILURE in 4m 14s
⚠️ integration-community.aws-1 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-2 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-3 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-4 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-5 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-6 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-7 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-8 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-9 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-10 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-11 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-12 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-13 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-14 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-15 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-16 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-17 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-18 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-19 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-20 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-21 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-22 SKIPPED Skipped due to failed job ansible-test-splitter

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@softwarefactory-project-zuul

Copy link
Copy Markdown
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/589fd0ac56ba464a94510f70aec4d6e6

✔️ ansible-galaxy-importer SUCCESS in 4m 57s (non-voting)
✔️ build-ansible-collection SUCCESS in 11m 08s
✔️ ansible-test-splitter SUCCESS in 4m 26s
integration-community.aws-1 FAILURE in 13m 39s
Skipped 21 jobs

@jonpspri

Copy link
Copy Markdown
Contributor Author

Waiting for CI/CD security privilege updates in mattclay/aws-terminator#330 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow bulk deletion of ECS Task Definitions

2 participants