From 3fa3bf08226a7508d8a735d07052e80cb55dbe4b Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 13 Aug 2025 15:11:00 -0300 Subject: [PATCH 1/3] ci: Update ansible-core to 2.18 in CI The ansible-core version used in the CI pipelines has been updated from 2.16 to 2.18 to keep the testing environment current. Additionally, the pull request pipeline has been enhanced to test against the specific ansible-core versions that are packaged with the latest stable distributions. This will help ensure that the roles remain compatible with the versions users are likely to have installed. Signed-off-by: Rafael Guterres Jeffman --- infra/azure/azure-pipelines.yml | 6 +++--- infra/azure/nightly.yml | 2 +- infra/azure/pr-pipeline.yml | 36 ++++++++++++++++++++++++++++----- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/infra/azure/azure-pipelines.yml b/infra/azure/azure-pipelines.yml index b79f9825..a3768d14 100644 --- a/infra/azure/azure-pipelines.yml +++ b/infra/azure/azure-pipelines.yml @@ -6,7 +6,7 @@ pool: vmImage: 'ubuntu-24.04' variables: - ansible_version: "-core >=2.16,<2.17" + ansible_version: "-core >=2.18,<2.19" ansible_latest: "-core" ansible_minimum: "-core <2.16" distros: "fedora-latest,c9s,c10s,fedora-rawhide" @@ -36,7 +36,7 @@ stages: # Supported distros - ${{ each distro in split(variables.distros, ',') }}: - - stage: ${{ replace(distro, '-', '_') }}_ansible_2_16 + - stage: ${{ replace(distro, '-', '_') }}_ansible_2_18 dependsOn: [] jobs: - template: templates/group_tests.yml @@ -49,7 +49,7 @@ stages: # Galaxy on Fedora -- stage: galaxy_fedora_latest_ansible_2_16 +- stage: galaxy_fedora_latest_ansible_2_18 dependsOn: [] jobs: - template: templates/group_tests.yml diff --git a/infra/azure/nightly.yml b/infra/azure/nightly.yml index 7eb3a30b..8f3d1605 100644 --- a/infra/azure/nightly.yml +++ b/infra/azure/nightly.yml @@ -18,7 +18,7 @@ variables: distros: "fedora-latest,fedora-rawhide,c10s,c9s,c8s" ansible_latest: "-core" ansible_minimum: "-core <2.16" - ansible_version: "-core >=2.16,<2.17" + ansible_version: "-core >=2.18,<2.19" stages: diff --git a/infra/azure/pr-pipeline.yml b/infra/azure/pr-pipeline.yml index d87b24d9..9d990dfd 100644 --- a/infra/azure/pr-pipeline.yml +++ b/infra/azure/pr-pipeline.yml @@ -5,16 +5,27 @@ trigger: pool: vmImage: 'ubuntu-24.04' +parameters: + # Not really a parameter, but variables cannot be arrays or dicts + # This maps the distro LATEST version to the avaiable ansible-core + # version of the latest released compose. + - name: "distro_ansible_map" + type: object + default: + - { distro: "c8s", ansible_version: "2.16" } + - { distro: "c9s", ansible_version: "2.14" } + - { distro: "c10s", ansible_version: "2.16" } + variables: - distros: "fedora-latest,c10s,c9s,c8s,fedora-rawhide" - ansible_version: "-core >=2.15,<2.16" + distros: "fedora-latest,c10s,c9s,fedora-rawhide" + ansible_version: "-core >=2.18,<2.19" stages: -# Test with repository in all distros +# Test with repository in all "current" distros - ${{ each distro in split(variables.distros, ',') }}: - - stage: ${{ replace(distro, '-', '_') }}_ansible_2_16 + - stage: ${{ replace(distro, '-', '_') }}_ansible_2_18 dependsOn: [] jobs: - template: templates/run_tests.yml @@ -27,7 +38,7 @@ stages: # Galaxy on Fedora -- stage: galaxy_fedora_latest_ansible_2_16 +- stage: galaxy_fedora_latest_ansible_2_18 dependsOn: [] jobs: - template: templates/run_tests.yml @@ -37,3 +48,18 @@ stages: ansible_version: ${{ variables.ansible_version }} skip_git_test: false test_galaxy: true + + +# Test with pinned ansible version for the distro + +- ${{ each config in parameters.distro_ansible_map }}: + - stage: ${{ config.distro }}_distro_ansible_${{ replace(config.ansible_version, '.', '_') }} + dependsOn: [] + jobs: + - template: templates/run_tests.yml + parameters: + build_number: $(Build.BuildNumber) + distro: ${{ config.distro }} + ansible_version: -core==${{ config.ansible_version }} + skip_git_test: false + test_galaxy: false From dd3bc4fcddd7cb5a6bd0043ba596c2dc866c9bb9 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Fri, 7 Nov 2025 11:36:49 -0300 Subject: [PATCH 2/3] linter: Pin Python version for ansible-lint ansible-lint is complaining that Python 3.14 requries ansible-core 2.20, even if other versions work on that Python version. Woraround implemented is to pin the ansible-lint Python version to 3.13. Signed-off-by: Rafael Guterres Jeffman --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bfddba60..e758c32c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5.1.0 with: - python-version: "3.x" + python-version: "3.13" - name: Run ansible-lint run: | pip install "ansible-core>=2.16,<2.17" 'ansible-lint==6.22' From 95d935f1857c8e92f02ee13770f6556a78b56670 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Fri, 7 Nov 2025 10:42:02 -0300 Subject: [PATCH 3/3] ansible-docs: Update versions for ansible-doc-test checks Older versions of ansible-doc-test are failing due to code errors in the parsing module. This is fixed by using newer versions. Signed-off-by: Rafael Guterres Jeffman --- .github/workflows/docs.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f509046c..932c5f27 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,7 +5,7 @@ on: - pull_request jobs: check_docs_oldest_supported: - name: Check Ansible Documentation with ansible-core 2.13. + name: Check Ansible Documentation with ansible-core 2.16. runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.1 @@ -14,15 +14,15 @@ jobs: - uses: actions/setup-python@v5.1.0 with: python-version: '3.x' - - name: Install Ansible 2.13 + - name: Install Ansible 2.16 run: | - python -m pip install "ansible-core >=2.13,<2.14" + python -m pip install "ansible-core >=2.16,<2.17" - name: Run ansible-doc-test run: | ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins check_docs_previous: - name: Check Ansible Documentation with ansible-core 2.14. + name: Check Ansible Documentation with ansible-core 2.18. runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.1 @@ -31,15 +31,15 @@ jobs: - uses: actions/setup-python@v5.1.0 with: python-version: '3.x' - - name: Install Ansible 2.14 + - name: Install Ansible 2.18 run: | - python -m pip install "ansible-core >=2.14,<2.15" + python -m pip install "ansible-core >=2.18,<2.19" - name: Run ansible-doc-test run: | ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins check_docs_current: - name: Check Ansible Documentation with ansible-core 2.15. + name: Check Ansible Documentation with ansible-core 2.19. runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.1 @@ -48,9 +48,9 @@ jobs: - uses: actions/setup-python@v5.1.0 with: python-version: '3.x' - - name: Install Ansible 2.15 + - name: Install Ansible 2.20 run: | - python -m pip install "ansible-core >=2.15,<2.16" + python -m pip install "ansible-core <2.20" - name: Run ansible-doc-test run: | ANSIBLE_LIBRARY="." ANSIBLE_DOC_FRAGMENT_PLUGINS="." python utils/ansible-doc-test -v roles plugins