- name: Include OS-specific variables.
include_vars: "{{ item }}"
with_first_found:
+ - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml"
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}.yml"
--- /dev/null
+RedHat.yml
\ No newline at end of file
- name: Include OS-specific variables.
include_vars: "{{ item }}"
with_first_found:
+ - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml"
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}.yml"
---
+- name: Enable epel-release
+ # This provides some extra packages, eg. htop, python3-virtualenv
+ dnf:
+ name: epel-release
+
+- name: Enable rocky devel repository
+ yum_repository:
+ name: devel
+ description: "Rocky Linux $releasever - Devel"
+ mirrorlist: "https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=Devel-$releasever"
+ enabled: true
+ gpgcheck: true
+ when: ansible_distribution == 'Rocky'
+
- name: Ensure common packages are installed.
dnf:
name: "{{ common_packages }}"