Skip to content

Commit 2a16d30

Browse files
spetrosirichm
authored andcommitted
ref: Relax collection constraints, gate vendored modules by python version, update ci versions [citest_skip]
Enhancement: * Remove the centralized ansible.posix and community.general version caps so all roles track the latest releases. * Add variables for <rolename>_is_rh_distro_<ver> * Update CI actions versions Reason: The caps (ansible.posix <2.2.0, community.general <12.0.0) existed to preserve compatibility with older managed nodes. That is now handled inside the roles by selecting a vendored module or the latest collection module based on the managed node's python version (latest community.general needs python >= 3.7, latest ansible.posix needs python 3), so the central caps are no longer needed. Result: Roles pick up the latest ansible.posix and community.general, while older-python managed nodes (e.g. EL7) keep working via the vendored modules. Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
1 parent a17168b commit 2a16d30

9 files changed

Lines changed: 24 additions & 13 deletions

File tree

.github/workflows/build_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
--output ${{ env.RELEASE_VERSION }}/README.html README.md
6161
6262
- name: Upload docs HTML artifact
63-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
63+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6464
with:
6565
name: docs-html
6666
path: ${{ env.RELEASE_VERSION }}/README.html
@@ -126,7 +126,7 @@ jobs:
126126
fi
127127
128128
- name: Download docs HTML artifact
129-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
129+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
130130
with:
131131
name: docs-html
132132
path: ${{ env.RELEASE_VERSION }}

.github/workflows/changelog_to_tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
- name: Create Release
8181
id: create_release
82-
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1
82+
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
8383
with:
8484
tag: ${{ steps.tag.outputs.tagname }}
8585
name: Version ${{ steps.tag.outputs.tagname }}

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
persist-credentials: false
1919

2020
- name: Codespell
21-
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2
21+
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2

.github/workflows/qemu-kvm-integration-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
131131
- name: Ensure use of podman 5
132132
if: steps.check_platform.outputs.supported && steps.check_podman_version.outputs.need_podman_update == 1
133-
uses: redhat-actions/podman-install@3b6c60c447c93960c0b76faa0c66c6694bc71350 # main
133+
uses: redhat-actions/podman-install@0499d3899e6b92f60548b38421893a7f8ba4bd07 # main
134134

135135
- name: Configure tox-lsr
136136
if: steps.check_platform.outputs.supported
@@ -214,7 +214,7 @@ jobs:
214214
215215
- name: Upload test logs on failure
216216
if: failure()
217-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
217+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
218218
with:
219219
name: "logs-${{ matrix.scenario.image }}-${{ matrix.scenario.env }}"
220220
path: |
@@ -240,7 +240,7 @@ jobs:
240240
241241
- name: Set commit status as success with a description that platform is skipped
242242
if: ${{ steps.check_platform.outputs.supported == '' }}
243-
uses: myrotvorets/set-commit-status-action@2774e1f040c82ed70a76b4b5cd53bb11ffaedd0a # master
243+
uses: myrotvorets/set-commit-status-action@c0f880c99d91381c6fdb97726f03feb8004409b4 # master
244244
with:
245245
status: success
246246
context: "${{ github.workflow }} / scenario (${{ matrix.scenario.image }}, ${{ matrix.scenario.env }}) (pull_request)"

.github/workflows/test_converting_readme.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
--output README.html README.md
4646
4747
- name: Upload README.html as an artifact
48-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
48+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4949
with:
5050
name: README.html
5151
path: README.html

.github/workflows/tft.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
140140
- name: Set commit status as pending
141141
if: contains(needs.prepare_vars.outputs.supported_platforms, matrix.platform)
142-
uses: myrotvorets/set-commit-status-action@2774e1f040c82ed70a76b4b5cd53bb11ffaedd0a # master
142+
uses: myrotvorets/set-commit-status-action@c0f880c99d91381c6fdb97726f03feb8004409b4 # master
143143
with:
144144
sha: ${{ needs.prepare_vars.outputs.head_sha }}
145145
status: pending
@@ -149,7 +149,7 @@ jobs:
149149

150150
- name: Set commit status as success with a description that platform is skipped
151151
if: "!contains(needs.prepare_vars.outputs.supported_platforms, matrix.platform)"
152-
uses: myrotvorets/set-commit-status-action@2774e1f040c82ed70a76b4b5cd53bb11ffaedd0a # master
152+
uses: myrotvorets/set-commit-status-action@c0f880c99d91381c6fdb97726f03feb8004409b4 # master
153153
with:
154154
sha: ${{ needs.prepare_vars.outputs.head_sha }}
155155
status: success
@@ -158,7 +158,7 @@ jobs:
158158
targetUrl: ""
159159

160160
- name: Run test in testing farm
161-
uses: sclorg/testing-farm-as-github-action@230555baceb860aa468d216f1822974836b965d1 # v4
161+
uses: sclorg/testing-farm-as-github-action@230555baceb860aa468d216f1822974836b965d1 # v4.3.1
162162
if: contains(needs.prepare_vars.outputs.supported_platforms, matrix.platform)
163163
with:
164164
git_ref: main
@@ -187,7 +187,7 @@ jobs:
187187
tmt_plan_filter: "tag:playbooks_parallel,aide"
188188

189189
- name: Set final commit status
190-
uses: myrotvorets/set-commit-status-action@2774e1f040c82ed70a76b4b5cd53bb11ffaedd0a # master
190+
uses: myrotvorets/set-commit-status-action@c0f880c99d91381c6fdb97726f03feb8004409b4 # master
191191
if: always() && contains(needs.prepare_vars.outputs.supported_platforms, matrix.platform)
192192
with:
193193
sha: ${{ needs.prepare_vars.outputs.head_sha }}

meta/collection-requirements.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
---
33
collections:
44
- name: ansible.posix
5-
version: '>=2.1.0,<2.2.0'

tests/vars/rh_distros_vars.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ __aide_is_rh_distro: "{{ ansible_facts['distribution'] in __aide_rh_distros }}"
1818

1919
# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
2020
__aide_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __aide_rh_distros_fedora }}"
21+
22+
# Use these in conditionals to check if distro is Red Hat or clone of a specific major version
23+
__aide_is_rh_distro_7: "{{ __aide_is_rh_distro and ansible_facts['distribution_major_version'] == '7' }}"
24+
__aide_is_rh_distro_8: "{{ __aide_is_rh_distro and ansible_facts['distribution_major_version'] == '8' }}"
25+
__aide_is_rh_distro_9: "{{ __aide_is_rh_distro and ansible_facts['distribution_major_version'] == '9' }}"
26+
__aide_is_rh_distro_10: "{{ __aide_is_rh_distro and ansible_facts['distribution_major_version'] == '10' }}"

vars/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,10 @@ __aide_is_rh_distro: "{{ ansible_facts['distribution'] in __aide_rh_distros }}"
4141

4242
# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
4343
__aide_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __aide_rh_distros_fedora }}"
44+
45+
# Use these in conditionals to check if distro is Red Hat or clone of a specific major version
46+
__aide_is_rh_distro_7: "{{ __aide_is_rh_distro and ansible_facts['distribution_major_version'] == '7' }}"
47+
__aide_is_rh_distro_8: "{{ __aide_is_rh_distro and ansible_facts['distribution_major_version'] == '8' }}"
48+
__aide_is_rh_distro_9: "{{ __aide_is_rh_distro and ansible_facts['distribution_major_version'] == '9' }}"
49+
__aide_is_rh_distro_10: "{{ __aide_is_rh_distro and ansible_facts['distribution_major_version'] == '10' }}"
4450
# END - DO NOT EDIT THIS BLOCK - rh distros variables

0 commit comments

Comments
 (0)