Skip to content

Commit b019378

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 55c5b0a commit b019378

9 files changed

Lines changed: 19 additions & 8 deletions

File tree

.github/workflows/build_docs.yml

Lines changed: 1 addition & 1 deletion
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

.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@8f01853be192eb0f849a5c7d721450e7a467c579 # v2
21+
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2

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

Lines changed: 2 additions & 2 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: |

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

defaults/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,10 @@ __logging_is_rh_distro: "{{ ansible_facts['distribution'] in __logging_rh_distro
164164

165165
# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
166166
__logging_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __logging_rh_distros_fedora }}"
167+
168+
# Use these in conditionals to check if distro is Red Hat or clone of a specific major version
169+
__logging_is_rh_distro_7: "{{ __logging_is_rh_distro and ansible_facts['distribution_major_version'] == '7' }}"
170+
__logging_is_rh_distro_8: "{{ __logging_is_rh_distro and ansible_facts['distribution_major_version'] == '8' }}"
171+
__logging_is_rh_distro_9: "{{ __logging_is_rh_distro and ansible_facts['distribution_major_version'] == '9' }}"
172+
__logging_is_rh_distro_10: "{{ __logging_is_rh_distro and ansible_facts['distribution_major_version'] == '10' }}"
167173
# END - DO NOT EDIT THIS BLOCK - rh distros variables

meta/collection-requirements.yml

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

tests/vars/rh_distros_vars.yml

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

1919
# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
2020
__logging_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __logging_rh_distros_fedora }}"
21+
22+
# Use these in conditionals to check if distro is Red Hat or clone of a specific major version
23+
__logging_is_rh_distro_7: "{{ __logging_is_rh_distro and ansible_facts['distribution_major_version'] == '7' }}"
24+
__logging_is_rh_distro_8: "{{ __logging_is_rh_distro and ansible_facts['distribution_major_version'] == '8' }}"
25+
__logging_is_rh_distro_9: "{{ __logging_is_rh_distro and ansible_facts['distribution_major_version'] == '9' }}"
26+
__logging_is_rh_distro_10: "{{ __logging_is_rh_distro and ansible_facts['distribution_major_version'] == '10' }}"

0 commit comments

Comments
 (0)