Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: alma8 adaptations on openldap, r, python_pip #96

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
## Supported distribution

- Rocky 8.6+
- Alma[^alma] 8

[^alma]: Alma does not provide `openldap-servers` package so it is not supported for host in `[kdc]` Ansible group.
- Alma 8

## Topology

Expand Down
28 changes: 18 additions & 10 deletions roles/ldap_kerberos/tasks/openldap_servers_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,31 @@
# SPDX-License-Identifier: Apache-2.0

---
- name: Enable openldap-servers repo
- name: Enable openldap-servers repo for Rocky or AlmaLinux
community.general.ini_file:
path: "{{ repos[ansible_distribution_major_version]['path'] }}"
section: "{{ repos[ansible_distribution_major_version]['section'] }}"
path: "{{ repos[ansible_distribution][ansible_distribution_major_version]['path'] }}"
section: "{{ repos[ansible_distribution][ansible_distribution_major_version]['section'] }}"
option: enabled
value: "1"
no_extra_spaces: yes
vars:
repos:
'8':
path: /etc/yum.repos.d/Rocky-PowerTools.repo
section: powertools
'9':
path: /etc/yum.repos.d/rocky-extras.repo
section: plus
Rocky:
'8':
path: /etc/yum.repos.d/Rocky-PowerTools.repo
section: powertools
'9':
path: /etc/yum.repos.d/rocky-extras.repo
section: plus
AlmaLinux:
'8':
path: /etc/yum.repos.d/almalinux-powertools.repo
section: powertools
'9':
path: /etc/yum.repos.d/almalinux-extras.repo
section: plus
when:
- openldap_servers_repo_enabled
- ansible_distribution == 'Rocky'
- ansible_distribution in ['Rocky', 'AlmaLinux']
- ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9'
notify: dnf makecache
2 changes: 1 addition & 1 deletion roles/system/tasks/python_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
environment: "{{ proxy_env }}"

# https://developers.redhat.com/blog/2019/05/07/what-no-python-in-red-hat-enterprise-linux-8
- name: Set alternatives for Rocky8
- name: Set alternatives for Rocky8 or Alma8
community.general.alternatives:
name: python
path: /usr/bin/python3
Expand Down
19 changes: 13 additions & 6 deletions roles/system/tasks/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,24 @@
---
- name: Ensure powertools repository is enabled
community.general.ini_file:
path: "{{ repos[ansible_distribution_major_version]['path'] }}"
section: "{{ repos[ansible_distribution_major_version]['section'] }}"
path: "{{ repos[ansible_distribution][ansible_distribution_major_version]['path'] }}"
section: "{{ repos[ansible_distribution][ansible_distribution_major_version]['section'] }}"
option: enabled
value: "1"
no_extra_spaces: yes
vars:
repos:
'8':
path: /etc/yum.repos.d/Rocky-PowerTools.repo
section: powertools
when: "(ansible_distribution_major_version | int) >= 8"
Rocky:
'8':
path: /etc/yum.repos.d/Rocky-PowerTools.repo
section: powertools
AlmaLinux:
'8':
path: /etc/yum.repos.d/almalinux-powertools.repo
section: powertools
when:
- ansible_distribution in ['Rocky', 'AlmaLinux']
- (ansible_distribution_major_version | int) >= 8

- name: Install R
ansible.builtin.yum:
Expand Down