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

Adds RHEL9 support for free_ipaserver & free_ipaclient #176

Merged
merged 1 commit into from
Feb 29, 2024
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
5 changes: 5 additions & 0 deletions roles/freeipa_client/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
{{ ansible_default_ipv4.address }} {{ inventory_hostname }} {{ inventory_hostname_short }}
notify: restart host

- name: Check for existence of /etc/dhcp/dhclient.conf
ansible.builtin.stat: path=/etc/dhcp/dhclient.conf
register: dhclient_conf

- name: Set /etc/dhcp/dhclient.conf for domain search and name servers
ansible.builtin.lineinfile:
path: /etc/dhcp/dhclient.conf
Expand All @@ -103,6 +107,7 @@
entries:
domain_search: supersede domain-search "{{ ipaserver_domain }}";
domain_name_servers: supersede domain-name-servers {{ ipa_server_ips | sort | union(fallback_nameservers) | join(', ') }};
when: dhclient_conf.stat.exists
notify: restart host

- name: Flush handlers
Expand Down
1 change: 1 addition & 0 deletions roles/freeipa_server/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
ipaserver_resolv_nameservers: [ '8.8.8.8' ]
ipaserver_server_recursion: true
enable_dns: false
needs_python2: True
24 changes: 16 additions & 8 deletions roles/freeipa_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@
name: nss
state: latest

- name: Install Python and supporting packages
- name: Install Python2 when needed
ansible.builtin.package:
lock_timeout: 180
name: "{{ __pyver_item }}"
name: python2
update_cache: yes
state: present
loop:
- python3
- python2
loop_control:
loop_var: __pyver_item

when: needs_python2

- name: Install Python3
ansible.builtin.package:
lock_timeout: 180
name: python3
update_cache: yes
state: present

- name: Disable SELinux
ansible.posix.selinux:
state: disabled
Expand Down Expand Up @@ -110,6 +113,10 @@
backup: yes
notify: restart host

- name: Check for existence of /etc/dhcp/dhclient.conf
ansible.builtin.stat: path=/etc/dhcp/dhclient.conf
register: dhclient_conf

- name: Set /etc/dhcp/dhclient.conf for domain search and name servers
ansible.builtin.lineinfile:
path: /etc/dhcp/dhclient.conf
Expand All @@ -124,6 +131,7 @@
entries:
domain_search: supersede domain-search "{{ [[name_prefix, domain] | join('.'), domain] | join('", "') }}";
domain_name_servers: supersede domain-name-servers 127.0.0.1, {{ ipaserver_resolv_nameservers | join(', ') }};
when: dhclient_conf.stat.exists
notify: restart host

- name: Flush handlers
Expand Down
1 change: 1 addition & 0 deletions roles/freeipa_server/vars/RedHat-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
# limitations under the License.

ipaserver_packages: [ "ipa-server", "libselinux-python" ]
needs_python2: True
1 change: 1 addition & 0 deletions roles/freeipa_server/vars/RedHat-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
# limitations under the License.

ipaserver_packages: [ "@idm:DL1/server" ]
needs_python2: True
19 changes: 19 additions & 0 deletions roles/freeipa_server/vars/RedHat-9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---

# Copyright 2023 Cloudera, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

ipaserver_packages: [ "ipa-server" ]
ipaserver_packages_dns: [ "ipa-server-dns" ]
needs_python2: False
1 change: 1 addition & 0 deletions roles/freeipa_server/vars/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
# limitations under the License.

ipaserver_packages: [ "ipa-server", "python3-libselinux" ]
needs_python2: True
Loading