From 9dfce30008971dd2d2d1928625cc60277d50c35b Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Mon, 3 Aug 2026 13:56:56 +0000 Subject: [PATCH 1/6] fix(ci): skip tox sanity envs when Python interpreter is unavailable GitHub Actions runners no longer provide py3.11/py3.13 for the default 3.x setup-python job. Add skip_missing_interpreters and align skip list with aap_configuration_extended so sanity tests skip missing interpreters instead of failing the workflow. Co-authored-by: Cursor --- tox-ansible.ini | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tox-ansible.ini b/tox-ansible.ini index 1696d9e2..8adc9c9a 100644 --- a/tox-ansible.ini +++ b/tox-ansible.ini @@ -1,8 +1,24 @@ +[tox] +# Each CI matrix job installs only one Python; skip envs for missing interpreters. +skip_missing_interpreters = true + [ansible] skip = + py3.7 + py3.8 + py3.9 + py3.10 + py3.11-devel py3.12-devel + py3.12-milestone + 2.9 + 2.10 + 2.11 + 2.12 + 2.13 [testenv] pass_env = GITHUB_TOKEN ANSIBLE_GALAXY_SERVER* + ANSIBLE_COLLECTIONS_PATH From 707811112cb31083c24a08c2d6b71c390cf10c62 Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Thu, 27 Aug 2026 14:30:40 +0000 Subject: [PATCH 2/6] Combine dependabot bumps and fix pre-commit CI Merge ansible-content-actions workflow updates and ansible-content-prek-actions v26.7.2, and install awx.awx collections before ansible-lint in CI. Co-authored-by: Cursor --- .github/workflows/build-import.yml | 2 +- .github/workflows/changelog.yml | 2 +- .github/workflows/pre-commit.yml | 7 +++++++ .github/workflows/sanity.yml | 2 +- .pre-commit-config.yaml | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-import.yml b/.github/workflows/build-import.yml index e2473854..d44ad280 100644 --- a/.github/workflows/build-import.yml +++ b/.github/workflows/build-import.yml @@ -11,4 +11,4 @@ permissions: jobs: build-import: - uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@dc47efd46c312b6ffaf10c274825707a65ac1d86 # main + uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@c81d405f1de6452c2ba7ddaca919afc65f8fe7ca # main diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 042aec32..30448121 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -9,4 +9,4 @@ permissions: jobs: changelog: - uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@dc47efd46c312b6ffaf10c274825707a65ac1d86 # main + uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@c81d405f1de6452c2ba7ddaca919afc65f8fe7ca # main diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ca2ac72e..67256a0a 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,11 +18,18 @@ permissions: jobs: pre-commit: runs-on: ubuntu-latest + env: + ANSIBLE_COLLECTIONS_PATH: ${{ github.workspace }}/collections steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6 with: python-version: "3.x" + - name: Install collections required for ansible-lint + run: | + pip install ansible-core + mkdir -p "${ANSIBLE_COLLECTIONS_PATH}" + ansible-galaxy collection install -r .github/collections/requirements.yml -p "${ANSIBLE_COLLECTIONS_PATH}" - name: Run default pre-commit hooks uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 - name: Run sanity (manual stage) diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index 02758e0d..151b549b 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -11,4 +11,4 @@ permissions: jobs: sanity: - uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@dc47efd46c312b6ffaf10c274825707a65ac1d86 # main + uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@c81d405f1de6452c2ba7ddaca919afc65f8fe7ca # main diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 76118c38..b1a9e1d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: types: [python] - repo: https://github.com/djdanielsson/ansible-content-prek-actions - rev: v26.4.6 + rev: v26.7.2 hooks: - id: ansible-lint - id: changelog From d476cb629c81de651d606ae14ab3d85cd6d593dc Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Thu, 27 Aug 2026 14:36:40 +0000 Subject: [PATCH 3/6] Fix collection install path to avoid ansible-lint scanning awx.awx Install collections outside the workspace so ansible-lint does not lint the awx.awx collection files bundled in the checkout. Co-authored-by: Cursor --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 67256a0a..9660d480 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -19,7 +19,7 @@ jobs: pre-commit: runs-on: ubuntu-latest env: - ANSIBLE_COLLECTIONS_PATH: ${{ github.workspace }}/collections + ANSIBLE_COLLECTIONS_PATH: /home/runner/collections steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6 From 8e9a2cfec0638f5c43f46eab92adfea0be43b377 Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Thu, 27 Aug 2026 14:42:47 +0000 Subject: [PATCH 4/6] Force reinstall awx.awx to default collections path in CI Remove any stale awx.awx install from ~/.ansible/collections before ansible-lint runs so module resolution uses a complete collection. Co-authored-by: Cursor --- .github/workflows/pre-commit.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 9660d480..b83bfea4 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,8 +18,6 @@ permissions: jobs: pre-commit: runs-on: ubuntu-latest - env: - ANSIBLE_COLLECTIONS_PATH: /home/runner/collections steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6 @@ -28,8 +26,8 @@ jobs: - name: Install collections required for ansible-lint run: | pip install ansible-core - mkdir -p "${ANSIBLE_COLLECTIONS_PATH}" - ansible-galaxy collection install -r .github/collections/requirements.yml -p "${ANSIBLE_COLLECTIONS_PATH}" + rm -rf "${HOME}/.ansible/collections/ansible_collections/awx" + ansible-galaxy collection install -r .github/collections/requirements.yml --force - name: Run default pre-commit hooks uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 - name: Run sanity (manual stage) From d1c151ed66646e3ed78eca72517c57b8d1da7d49 Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Thu, 27 Aug 2026 14:58:10 +0000 Subject: [PATCH 5/6] Fix ansible-lint CI by installing awx.awx into ./collections Install the dependency on Ansible's project collections path and exclude that directory from linting so short module names resolve without scanning awx.awx sources. Co-authored-by: Cursor --- .ansible-lint | 1 + .github/workflows/pre-commit.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 7827b32d..ed27640f 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -15,6 +15,7 @@ exclude_paths: - changelogs/ - tests/ - .ansible/ + - collections/ # runtime install of awx.awx for ansible-lint syntax-check # quiet: true # strict: true # verbosity: 1 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index b83bfea4..5656abb3 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -23,11 +23,11 @@ jobs: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6 with: python-version: "3.x" + # ./collections is on Ansible's search path and excluded from ansible-lint - name: Install collections required for ansible-lint run: | pip install ansible-core - rm -rf "${HOME}/.ansible/collections/ansible_collections/awx" - ansible-galaxy collection install -r .github/collections/requirements.yml --force + ansible-galaxy collection install -r .github/collections/requirements.yml -p collections - name: Run default pre-commit hooks uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 - name: Run sanity (manual stage) From d72d3ef5ad829fd8c196e1adbbe47f89f8ad4d64 Mon Sep 17 00:00:00 2001 From: David Danielsson Date: Thu, 27 Aug 2026 15:13:34 +0000 Subject: [PATCH 6/6] Fix ansible-lint unknown-module via FQCN mock_modules Role meta declares collections: [awx.awx], so syntax-check resolves short names through that collection stub. Mock the awx.awx.* (and ansible.controller.*) module names so the stub provides them. Drop the ineffective CI collection-install workarounds. Co-authored-by: Cursor --- .ansible-lint | 93 +++++++++++++++++++++++++++++++- .github/workflows/pre-commit.yml | 5 -- 2 files changed, 92 insertions(+), 6 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index ed27640f..09aae37d 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -15,7 +15,6 @@ exclude_paths: - changelogs/ - tests/ - .ansible/ - - collections/ # runtime install of awx.awx for ansible-lint syntax-check # quiet: true # strict: true # verbosity: 1 @@ -70,6 +69,98 @@ mock_modules: - workflow_job_template - workflow_launch - workflow_node_wait + - awx.awx.ad_hoc_command_cancel + - awx.awx.ad_hoc_command + - awx.awx.ad_hoc_command_wait + - awx.awx.application + - awx.awx.bulk_host_create + - awx.awx.bulk_host_delete + - awx.awx.bulk_job_launch + - awx.awx.controller_meta + - awx.awx.credential_input_source + - awx.awx.credential + - awx.awx.credential_type + - awx.awx.execution_environment + - awx.awx.export + - awx.awx.group + - awx.awx.host + - awx.awx.import + - awx.awx.instance_group + - awx.awx.instance + - awx.awx.inventory + - awx.awx.inventory_source + - awx.awx.inventory_source_update + - awx.awx.job_cancel + - awx.awx.job_launch + - awx.awx.job_list + - awx.awx.job_template + - awx.awx.job_wait + - awx.awx.label + - awx.awx.license + - awx.awx.notification_template + - awx.awx.organization + - awx.awx.project + - awx.awx.project_update + - awx.awx.role_definition + - awx.awx.role + - awx.awx.role_team_assignment + - awx.awx.role_user_assignment + - awx.awx.schedule + - awx.awx.settings + - awx.awx.subscriptions + - awx.awx.team + - awx.awx.user + - awx.awx.workflow_approval + - awx.awx.workflow_job_template_node + - awx.awx.workflow_job_template + - awx.awx.workflow_launch + - awx.awx.workflow_node_wait + - ansible.controller.ad_hoc_command_cancel + - ansible.controller.ad_hoc_command + - ansible.controller.ad_hoc_command_wait + - ansible.controller.application + - ansible.controller.bulk_host_create + - ansible.controller.bulk_host_delete + - ansible.controller.bulk_job_launch + - ansible.controller.controller_meta + - ansible.controller.credential_input_source + - ansible.controller.credential + - ansible.controller.credential_type + - ansible.controller.execution_environment + - ansible.controller.export + - ansible.controller.group + - ansible.controller.host + - ansible.controller.import + - ansible.controller.instance_group + - ansible.controller.instance + - ansible.controller.inventory + - ansible.controller.inventory_source + - ansible.controller.inventory_source_update + - ansible.controller.job_cancel + - ansible.controller.job_launch + - ansible.controller.job_list + - ansible.controller.job_template + - ansible.controller.job_wait + - ansible.controller.label + - ansible.controller.license + - ansible.controller.notification_template + - ansible.controller.organization + - ansible.controller.project + - ansible.controller.project_update + - ansible.controller.role_definition + - ansible.controller.role + - ansible.controller.role_team_assignment + - ansible.controller.role_user_assignment + - ansible.controller.schedule + - ansible.controller.settings + - ansible.controller.subscriptions + - ansible.controller.team + - ansible.controller.user + - ansible.controller.workflow_approval + - ansible.controller.workflow_job_template_node + - ansible.controller.workflow_job_template + - ansible.controller.workflow_launch + - ansible.controller.workflow_node_wait # mock_roles: # - mocked_role diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 5656abb3..ca2ac72e 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -23,11 +23,6 @@ jobs: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6 with: python-version: "3.x" - # ./collections is on Ansible's search path and excluded from ansible-lint - - name: Install collections required for ansible-lint - run: | - pip install ansible-core - ansible-galaxy collection install -r .github/collections/requirements.yml -p collections - name: Run default pre-commit hooks uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 - name: Run sanity (manual stage)