From 59560ad995be7f6a91b9bec5ec34b5800f3831b2 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Tue, 24 Feb 2026 17:02:38 +0100 Subject: [PATCH 1/6] Add .ansible-lint Signed-off-by: Alina Buzachis --- .ansible-lint | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .ansible-lint diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..39b3f0f --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,4 @@ +--- +profile: production +exclude_paths: + - tests/integration From 04874b711f43929ae02858df4e595df600dd9d7b Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Tue, 24 Feb 2026 17:41:30 +0100 Subject: [PATCH 2/6] Fix ansible-lint version Signed-off-by: Alina Buzachis --- .github/workflows/linters.yaml | 3 --- plugins/modules/eval_nat_network_acls.py | 12 ++++-------- tox.ini | 10 +++++++--- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index cf2b797..acb1db5 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -17,8 +17,5 @@ jobs: steps: - uses: actions/checkout@v4 - - name: run-ansible-lint - uses: ansible/ansible-lint@v25.1.2 - tox-linters: uses: ansible-network/github_actions/.github/workflows/tox-linters.yml@main diff --git a/plugins/modules/eval_nat_network_acls.py b/plugins/modules/eval_nat_network_acls.py index 75a0bad..48845ea 100644 --- a/plugins/modules/eval_nat_network_acls.py +++ b/plugins/modules/eval_nat_network_acls.py @@ -181,12 +181,10 @@ def check_egress_towards_dst(acls, dst_ip, dst_port): if acl["rule_action"] == "allow": break else: - self.fail_json( - msg=f"NatGateway Subnet {self.src_subnet_id}\ + self.fail_json(msg=f"NatGateway Subnet {self.src_subnet_id}\ Network Acl Egress Rules do not allow\ outbound traffic to destination: \ - {self.dst_ip} : {str(dst_port)}" - ) + {self.dst_ip} : {str(dst_port)}") self.fail_json( msg="NatGateway Subnet {0} Network Acl Egress Rules do not allow outbound traffic to destination: {1} : {2}".format( @@ -216,11 +214,9 @@ def check_ingress_from_dst(acls, src_ip): if acl["rule_action"] == "allow": break else: - self.fail_json( - msg=f"NatGateway Subnet {self.src_subnet_id} \ + self.fail_json(msg=f"NatGateway Subnet {self.src_subnet_id} \ Network Acl Ingress Rules do not allow \ - inbound traffic from destination: {self.dst_ip}" - ) + inbound traffic from destination: {self.dst_ip}") self.fail_json( msg="NatGateway Subnet {0} Network Acl Ingress Rules do not allow inbound traffic from destination: {1}".format( diff --git a/tox.ini b/tox.ini index 798bad7..7e81041 100644 --- a/tox.ini +++ b/tox.ini @@ -6,14 +6,14 @@ skipsdist = True format_dirs = {toxinidir}/plugins {toxinidir}/tests [testenv] -deps = -r {toxinidir}/requirements.txt - -r {toxinidir}/test-requirements.txt +deps = -r {toxinidir}/test-requirements.txt install_command = pip install {opts} {packages} [testenv:ansible-lint] +description = Run ansible-lint deps = ansible-lint >= 25.1.2 -commands = ansible-lint --profile production --format pep8 --nocolor --strict . +commands = ansible-lint . [testenv:black] deps = @@ -49,19 +49,23 @@ commands = deps = {[testenv:black]deps} {[testenv:isort]deps} + {[testenv:ansible-lint]deps} commands = {[testenv:black]commands} {[testenv:isort]commands} + {[testenv:ansible-lint]commands} [testenv:linters] deps = {[testenv:black]deps} {[testenv:flake8]deps} {[testenv:isort]deps} + {[testenv:ansible-lint]deps} commands = {[testenv:black]commands} {[testenv:flake8]commands} {[testenv:isort]commands} + {[testenv:ansible-lint]commands} [flake8] exclude = .git,.tox,tests/output From 9cd95ad7709068a7608d4e13e14df306f52c9d9b Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Tue, 24 Feb 2026 18:26:57 +0100 Subject: [PATCH 3/6] Fix github sanity workflows Signed-off-by: Alina Buzachis --- .ansible-lint | 2 ++ .github/workflows/linters.yaml | 5 +++++ .github/workflows/sanity-tests.yaml | 20 ++++++++++++++++++++ tox.ini | 6 +----- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 39b3f0f..a67ade1 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,4 +1,6 @@ --- profile: production exclude_paths: + - .ansible/ + - .github/ - tests/integration diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index acb1db5..a073d5e 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -16,6 +16,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: run-ansible-lint + uses: ansible/ansible-lint@main + with: + override_version: v25.5.0 tox-linters: uses: ansible-network/github_actions/.github/workflows/tox-linters.yml@main diff --git a/.github/workflows/sanity-tests.yaml b/.github/workflows/sanity-tests.yaml index 277ac83..fef5c59 100644 --- a/.github/workflows/sanity-tests.yaml +++ b/.github/workflows/sanity-tests.yaml @@ -33,18 +33,38 @@ jobs: "ansible-version": "milestone", "python-version": "3.10" }, + { + "ansible-version": "stable-2.20", + "python-version": "3.10" + }, + { + "ansible-version": "stable-2.20", + "python-version": "3.11" + }, { "ansible-version": "stable-2.19", "python-version": "3.10" }, + { + "ansible-version": "stable-2.19", + "python-version": "3.14" + }, { "ansible-version": "stable-2.18", "python-version": "3.10" }, + { + "ansible-version": "stable-2.18", + "python-version": "3.14" + }, { "ansible-version": "stable-2.17", "python-version": "3.13" }, + { + "ansible-version": "stable-2.17", + "python-version": "3.14" + }, { "ansible-version": "stable-2.16" } diff --git a/tox.ini b/tox.ini index 7e81041..2f51195 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ install_command = pip install {opts} {packages} description = Run ansible-lint deps = ansible-lint >= 25.1.2 -commands = ansible-lint . +commands = ansible-lint [testenv:black] deps = @@ -49,23 +49,19 @@ commands = deps = {[testenv:black]deps} {[testenv:isort]deps} - {[testenv:ansible-lint]deps} commands = {[testenv:black]commands} {[testenv:isort]commands} - {[testenv:ansible-lint]commands} [testenv:linters] deps = {[testenv:black]deps} {[testenv:flake8]deps} {[testenv:isort]deps} - {[testenv:ansible-lint]deps} commands = {[testenv:black]commands} {[testenv:flake8]commands} {[testenv:isort]commands} - {[testenv:ansible-lint]commands} [flake8] exclude = .git,.tox,tests/output From 56e9ebb827634b7627e4b0513f2693428752b104 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Wed, 25 Feb 2026 14:40:56 +0100 Subject: [PATCH 4/6] Fix typo Signed-off-by: Alina Buzachis --- .github/workflows/linters.yaml | 2 +- plugins/modules/eval_src_igw_route.py | 2 +- plugins/modules/eval_vpc_peering.py | 2 +- plugins/modules/validate_route_tables.py | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index a073d5e..29eaa2c 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -15,7 +15,7 @@ jobs: ansible-lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: ansible-network/github_actions/.github/actions/checkout_dependency@main - name: run-ansible-lint uses: ansible/ansible-lint@main diff --git a/plugins/modules/eval_src_igw_route.py b/plugins/modules/eval_src_igw_route.py index a95351d..ff77e68 100644 --- a/plugins/modules/eval_src_igw_route.py +++ b/plugins/modules/eval_src_igw_route.py @@ -118,7 +118,7 @@ private_dns_name: "ip-192-168-0-11.ec2.internal" private_ip_address: "192.168.0.11" private_ip_addresses: - - association": + - association: ip_owner_id: "amazon" public_dns_name: "ec2-3-93-192-138.compute-1.amazonaws.com" public_ip: "3.93.192.138" diff --git a/plugins/modules/eval_vpc_peering.py b/plugins/modules/eval_vpc_peering.py index 3edb37f..71015bb 100644 --- a/plugins/modules/eval_vpc_peering.py +++ b/plugins/modules/eval_vpc_peering.py @@ -56,7 +56,7 @@ cidr_block: "172.25.0.0/28" cidr_block_set: - cidr_block: "172.25.0.0/28" - owner_id": "721066863947" + owner_id: "721066863947" peering_options: allow_dns_resolution_from_remote_vpc: false allow_egress_from_local_classic_link_to_remote_vpc: false diff --git a/plugins/modules/validate_route_tables.py b/plugins/modules/validate_route_tables.py index 197cb5c..ad494b9 100644 --- a/plugins/modules/validate_route_tables.py +++ b/plugins/modules/validate_route_tables.py @@ -80,8 +80,8 @@ owner_id: "00000000000" private_dns_name_options_on_launch: enable_resource_name_dns_a_record: false - enable_resource_name_dns_aaaa_record": false - hostname_type": "ip-name" + enable_resource_name_dns_aaaa_record: false + hostname_type: "ip-name" state: "available" subnet_arn: "arn:aws:ec2:eu-west-2:721066863947:subnet/subnet-032f1a2598b6318ed" subnet_id: "subnet-032f1a2598b6318ed" @@ -163,8 +163,8 @@ interface_id: null network_interface_id: null origin: "CreateRoute" - state": "active" - vpc_id": "vpc-0bee28efef41e1de4" + state: "active" + vpc_id: "vpc-0bee28efef41e1de4" src_subnets: - assign_ipv6_address_on_creation: false availability_zone: "eu-west-2a" @@ -181,7 +181,7 @@ owner_id: "00000000000" private_dns_name_options_on_launch: enable_resource_name_dns_a_record: false - enable_resource_name_dns_aaaa_record": false + enable_resource_name_dns_aaaa_record: false hostname_type: "ip-name" state: "available" subnet_arn: "arn:aws:ec2:eu-west-2:721066863947:subnet/subnet-0af56e0d353f88cb8" From 411387a23d2deae221cc353d22d9a3086355bd86 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Wed, 25 Feb 2026 14:52:49 +0100 Subject: [PATCH 5/6] Switch to tox for ansible-lint Signed-off-by: Alina Buzachis --- .config/ansible-lint.yml | 9 -- .github/workflows/linters.yaml | 10 -- changelogs/changelog.yaml | 164 ++++++++++++++++----------------- galaxy.yml | 4 +- tox.ini | 10 +- 5 files changed, 92 insertions(+), 105 deletions(-) delete mode 100644 .config/ansible-lint.yml diff --git a/.config/ansible-lint.yml b/.config/ansible-lint.yml deleted file mode 100644 index f570091..0000000 --- a/.config/ansible-lint.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -profile: production -strict: true -exclude_paths: - - changelogs/changelog.yaml - - tests/integration -skip_list: - - ignore-errors # Use failed_when and specify error conditions instead of using ignore_errors. - - meta-no-info # meta/main.yml should contain relevant info. diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 29eaa2c..66a231d 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -12,15 +12,5 @@ on: - stable-* jobs: - ansible-lint: - runs-on: ubuntu-latest - steps: - - uses: ansible-network/github_actions/.github/actions/checkout_dependency@main - - - name: run-ansible-lint - uses: ansible/ansible-lint@main - with: - override_version: v25.5.0 - tox-linters: uses: ansible-network/github_actions/.github/workflows/tox-linters.yml@main diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index de95f56..0565ecc 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -3,132 +3,132 @@ releases: 1.0.1: changes: minor_changes: - - various playbooks - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). - - various plugins - formating using black (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). - - various roles - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). - - various tests - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). + - various playbooks - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). + - various plugins - formating using black (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). + - various roles - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). + - various tests - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). release_summary: Re-release 1.0.0 with updated README and generated CHNAGELOG, initial release of the collection fragments: - - 1_0_1_release.yml - - linting.yml + - 1_0_1_release.yml + - linting.yml release_date: '2022-11-11' 1.0.2: changes: minor_changes: - - various playbooks - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). - - various plugins - formating using black (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). - - various roles - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). - - various tests - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). + - various playbooks - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). + - various plugins - formating using black (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). + - various roles - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). + - various tests - minor linting fixes (https://github.com/ansible-collections/cloud.aws_troubleshooting/pull/6). fragments: - - linting.yml + - linting.yml release_date: '2022-11-16' 1.0.3: changes: bugfixes: - - Fix collection FQCN name issue for role troubleshooting_rds_connectivity (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/13). + - Fix collection FQCN name issue for role troubleshooting_rds_connectivity (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/13). fragments: - - multiple-renaming.yml + - multiple-renaming.yml release_date: '2023-03-17' 2.0.0: changes: breaking_changes: - - Remove support for ansible-core < 2.14 (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/33). - - roles/aws_setup_credentials - Due to ansible-lint issue, the AWS generated - credentials are now stored into variable ``aws_setup_credentials__output`` - instead of ``aws_role_credentials`` (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/24). - - roles/connectivity_troubleshooter_validate - Due to ansible-lint issue, the - next hop information are now stored into variable ``connectivity_troubleshooter_validate__next_hop`` - instead of ``next_hop`` (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/24). + - Remove support for ansible-core < 2.14 (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/33). + - roles/aws_setup_credentials - Due to ansible-lint issue, the AWS generated + credentials are now stored into variable ``aws_setup_credentials__output`` + instead of ``aws_role_credentials`` (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/24). + - roles/connectivity_troubleshooter_validate - Due to ansible-lint issue, the + next hop information are now stored into variable ``connectivity_troubleshooter_validate__next_hop`` + instead of ``next_hop`` (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/24). bugfixes: - - roles/connectivity_troubleshooter_igw - fix issue wen calling module ``cloud.aws_troubleshooting.eval_src_igw_route`` - with wrong value for parameters ``src_subnet_id`` and ``src_network_interface`` - (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/29). - - roles/connectivity_troubleshooter_local - fix issue when using wrong value - for source subnet id, should be ``connectivity_troubleshooter_local__src_subnet_id`` - instead of ``src_subnet_id`` and for destination subnet id, should be ``connectivity_troubleshooter_local__dst_subnet_id`` - instead of ``dst_subnet_id`` (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/29). - - roles/connectivity_troubleshooter_nat - fix issue when using wrong value for - source subnet id, should be ``connectivity_troubleshooter_nat__src_subnet_id`` - instead of ``src_subnet_id`` and add missing steps to gather information about - NAT subnet network ACLs and source ENI (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/29). + - roles/connectivity_troubleshooter_igw - fix issue wen calling module ``cloud.aws_troubleshooting.eval_src_igw_route`` + with wrong value for parameters ``src_subnet_id`` and ``src_network_interface`` + (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/29). + - roles/connectivity_troubleshooter_local - fix issue when using wrong value + for source subnet id, should be ``connectivity_troubleshooter_local__src_subnet_id`` + instead of ``src_subnet_id`` and for destination subnet id, should be ``connectivity_troubleshooter_local__dst_subnet_id`` + instead of ``dst_subnet_id`` (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/29). + - roles/connectivity_troubleshooter_nat - fix issue when using wrong value for + source subnet id, should be ``connectivity_troubleshooter_nat__src_subnet_id`` + instead of ``src_subnet_id`` and add missing steps to gather information about + NAT subnet network ACLs and source ENI (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/29). minor_changes: - - roles/aws_setup_credentials - add ``no_log=true`` when setting credentials - (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/29). + - roles/aws_setup_credentials - add ``no_log=true`` when setting credentials + (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/29). release_summary: This major release drops support for ansible-core versions lower than 2.14 and Python versions lower than 3.9. fragments: - - 20230426-update_readme_and_runtime.yml - - 20230907_multiple_fixes.yaml - - 20231018-add-integration-test-for-role-troubleshoot_rds_connectivity.yml - - 20231020-update_docs.yaml - - 20231113-update_supported_versions.yaml - - ansible_lint_sanity_fixes.yml - - automation_hub_update_readme.yaml - - fix_sanity_issues.yaml + - 20230426-update_readme_and_runtime.yml + - 20230907_multiple_fixes.yaml + - 20231018-add-integration-test-for-role-troubleshoot_rds_connectivity.yml + - 20231020-update_docs.yaml + - 20231113-update_supported_versions.yaml + - ansible_lint_sanity_fixes.yml + - automation_hub_update_readme.yaml + - fix_sanity_issues.yaml release_date: '2023-11-21' 3.0.0: changes: breaking_changes: - - Bump minimum version requirement for ansible-core to 2.15 (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/36). + - Bump minimum version requirement for ansible-core to 2.15 (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/36). minor_changes: - - Bump version of ansible-lint to minimum 24.7.0 (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/36). + - Bump version of ansible-lint to minimum 24.7.0 (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/36). release_summary: This release removes support for ansible-core < 2.15. fragments: - - 3.0.0.yml - - 36-bump-ansible-lint-version.yml - - readme_template_update.yml + - 3.0.0.yml + - 36-bump-ansible-lint-version.yml + - readme_template_update.yml release_date: '2024-07-30' 4.0.0: changes: breaking_changes: - - Support for ansible-core < 2.17 has been dropped - - 'setup_aws_credentials - Support for the ``EC2_ACCESS_KEY`` environment variable - has been removed in the latest major release of amazon.aws 10.0.0 and removed - from this role. Please use the ``aws_access_key`` parameter or ``AWS_ACCESS_KEY_ID`` - environment variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) + - Support for ansible-core < 2.17 has been dropped + - 'setup_aws_credentials - Support for the ``EC2_ACCESS_KEY`` environment variable + has been removed in the latest major release of amazon.aws 10.0.0 and removed + from this role. Please use the ``aws_access_key`` parameter or ``AWS_ACCESS_KEY_ID`` + environment variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) - ' - - 'setup_aws_credentials - Support for the ``EC2_REGION`` environment variable - has been removed in the latest major release of amazon.aws 10.0.0 and removed - from this role. Please use the ``region`` parameter or ``AWS_REGION`` environment - variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) + ' + - 'setup_aws_credentials - Support for the ``EC2_REGION`` environment variable + has been removed in the latest major release of amazon.aws 10.0.0 and removed + from this role. Please use the ``region`` parameter or ``AWS_REGION`` environment + variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) - ' - - 'setup_aws_credentials - Support for the ``EC2_SECRET_KEY`` environment variable - has been removed in the latest major release of amazon.aws 10.0.0 and removed - from this role.Please use the ``aws_secret_key`` parameter or ``AWS_SECRET_ACCESS_KEY`` - environment variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) + ' + - 'setup_aws_credentials - Support for the ``EC2_SECRET_KEY`` environment variable + has been removed in the latest major release of amazon.aws 10.0.0 and removed + from this role.Please use the ``aws_secret_key`` parameter or ``AWS_SECRET_ACCESS_KEY`` + environment variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) - ' - - 'setup_aws_credentials - Support for the ``EC2_SECURITY_TOKEN`` and the ``AWS_SECURITY_TOKEN`` - environment variable has been removed in the latest major release of amazon.aws - 10.0.0 and removed from this role. Please use the ``aws_session_token`` parameter - or ``AWS_SESSION_TOKEN`` environment variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) + ' + - 'setup_aws_credentials - Support for the ``EC2_SECURITY_TOKEN`` and the ``AWS_SECURITY_TOKEN`` + environment variable has been removed in the latest major release of amazon.aws + 10.0.0 and removed from this role. Please use the ``aws_session_token`` parameter + or ``AWS_SESSION_TOKEN`` environment variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) - ' - - 'setup_aws_credentials - Support for the ``EC2_URL_TOKEN`` environment variable - has been removed in the latest major release of amazon.aws 10.0.0 and removed - from this role. Please use the ``aws_endpoint_url`` parameter or ``AWS_URL`` - environment variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) + ' + - 'setup_aws_credentials - Support for the ``EC2_URL_TOKEN`` environment variable + has been removed in the latest major release of amazon.aws 10.0.0 and removed + from this role. Please use the ``aws_endpoint_url`` parameter or ``AWS_URL`` + environment variable instead. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) - ' + ' bugfixes: - - 'Fix integration tests to work with ansible-core 2.19. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) + - 'Fix integration tests to work with ansible-core 2.19. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) - ' + ' minor_changes: - - Bump version of ansible-lint to 25.1.2 (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/42). - - 'documentation - Update playbooks and roles documentation to provide updated - information. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) + - Bump version of ansible-lint to 25.1.2 (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/42). + - 'documentation - Update playbooks and roles documentation to provide updated + information. (https://github.com/redhat-cop/cloud.aws_troubleshooting/pull/45) - ' + ' release_summary: Support for certain environment variables has been removed. The versions of ansible-core, ansible-lint, amazon.aws, and community.aws have been updated. fragments: - - 4.0.0-increase_ansible_version.yml - - 4.0.0.yml - - 49-update-ansible-lint.yaml - - fixes.yml + - 4.0.0-increase_ansible_version.yml + - 4.0.0.yml + - 49-update-ansible-lint.yaml + - fixes.yml release_date: '2025-09-02' diff --git a/galaxy.yml b/galaxy.yml index 59628e6..b654b7f 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -14,8 +14,8 @@ tags: - infrastructure - cluster dependencies: - amazon.aws: '>=10.0.0' - community.aws: '>=10.0.0' + amazon.aws: '>=10.0.0,<12.0.0-dev0' + community.aws: '>=10.0.0,<12.0.0-dev0' repository: https://github.com/redhat-cop/cloud.aws_troubleshooting documentation: '' homepage: https://github.com/redhat-cop/cloud.aws_troubleshooting diff --git a/tox.ini b/tox.ini index 2f51195..6e0956a 100644 --- a/tox.ini +++ b/tox.ini @@ -12,16 +12,18 @@ install_command = pip install {opts} {packages} [testenv:ansible-lint] description = Run ansible-lint deps = - ansible-lint >= 25.1.2 + ansible-lint == 25.1.2 commands = ansible-lint [testenv:black] +description = Lint against "black" formatting standards deps = black commands = black --check --diff {[common]format_dirs} [testenv:black_format] +description = Apply "black" formatting deps = {[testenv:black]deps} commands = @@ -34,12 +36,14 @@ commands = flake8 {[common]format_dirs} [testenv:isort] +description = Lint for import sorting deps = isort commands = isort --check-only --diff {[common]format_dirs} [testenv:isort_format] +description = Sort imports deps = {[testenv:isort]deps} commands = @@ -58,14 +62,16 @@ deps = {[testenv:black]deps} {[testenv:flake8]deps} {[testenv:isort]deps} + {[testenv:ansible-lint]deps} commands = {[testenv:black]commands} {[testenv:flake8]commands} {[testenv:isort]commands} + {[testenv:ansible-lint]commands} [flake8] exclude = .git,.tox,tests/output -ignore = E501, W503, W504, E402, E501 +ignore = E501, W503, W504, E402 max-line-length = 160 builtins = _ show-source = True From 73a724842b3dd6f7bda70b1173c3097421b927d2 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Wed, 25 Feb 2026 18:49:43 +0100 Subject: [PATCH 6/6] Update tox.ini --- plugins/modules/eval_nat_network_acls.py | 12 ++++++++---- tox.ini | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/modules/eval_nat_network_acls.py b/plugins/modules/eval_nat_network_acls.py index 48845ea..75a0bad 100644 --- a/plugins/modules/eval_nat_network_acls.py +++ b/plugins/modules/eval_nat_network_acls.py @@ -181,10 +181,12 @@ def check_egress_towards_dst(acls, dst_ip, dst_port): if acl["rule_action"] == "allow": break else: - self.fail_json(msg=f"NatGateway Subnet {self.src_subnet_id}\ + self.fail_json( + msg=f"NatGateway Subnet {self.src_subnet_id}\ Network Acl Egress Rules do not allow\ outbound traffic to destination: \ - {self.dst_ip} : {str(dst_port)}") + {self.dst_ip} : {str(dst_port)}" + ) self.fail_json( msg="NatGateway Subnet {0} Network Acl Egress Rules do not allow outbound traffic to destination: {1} : {2}".format( @@ -214,9 +216,11 @@ def check_ingress_from_dst(acls, src_ip): if acl["rule_action"] == "allow": break else: - self.fail_json(msg=f"NatGateway Subnet {self.src_subnet_id} \ + self.fail_json( + msg=f"NatGateway Subnet {self.src_subnet_id} \ Network Acl Ingress Rules do not allow \ - inbound traffic from destination: {self.dst_ip}") + inbound traffic from destination: {self.dst_ip}" + ) self.fail_json( msg="NatGateway Subnet {0} Network Acl Ingress Rules do not allow inbound traffic from destination: {1}".format( diff --git a/tox.ini b/tox.ini index 6e0956a..fcdc7d4 100644 --- a/tox.ini +++ b/tox.ini @@ -12,13 +12,13 @@ install_command = pip install {opts} {packages} [testenv:ansible-lint] description = Run ansible-lint deps = - ansible-lint == 25.1.2 + ansible-lint >= 25.1.2 commands = ansible-lint [testenv:black] description = Lint against "black" formatting standards deps = - black + black >= 24.0, < 25.0 commands = black --check --diff {[common]format_dirs}