Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion resources/roles/preparation/tasks/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,31 @@
until: pkg_mgr_retry_done | bool
retries: "{{ pkg_mgr_retries }}"
delay: "{{ pkg_mgr_retry_delay }}"
when: pytest_is_needed | bool
when: >
pytest_is_needed | bool and
(ansible_facts.distribution == 'Fedora' or
ansible_facts.distribution_major_version | int < 10)
ignore_errors: "{{ ignore_ansible_install_errors | bool }}"

# EPEL 10 doesn't ship the "ansible" bundle, so use ansible-core
# from AppStream plus the most common collections from EPEL
- name: Install ansible-core and collections (10 and higher)
yum:
name:
- ansible-core
- ansible-collection-ansible-posix
- ansible-collection-community-general
state: present
enablerepo: epel
lock_timeout: 300
register: pkg_mgr_result
until: pkg_mgr_retry_done | bool
retries: "{{ pkg_mgr_retries }}"
delay: "{{ pkg_mgr_retry_delay }}"
when: >
pytest_is_needed | bool and
ansible_facts.distribution != 'Fedora' and
ansible_facts.distribution_major_version | int >= 10
ignore_errors: "{{ ignore_ansible_install_errors | bool }}"

- name: Add required repositories
Expand Down
Loading