From 773536daacb96f0a4fad74ee584e8aff3b86e7fe Mon Sep 17 00:00:00 2001 From: Nicolas Marcq Date: Tue, 18 Oct 2022 14:27:11 +0200 Subject: [PATCH] Fix LDAP module path on Rocky 8 and RHEL 8 Closes #190 --- templates/server.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/server.conf.j2 b/templates/server.conf.j2 index 086a14a..bb26478 100644 --- a/templates/server.conf.j2 +++ b/templates/server.conf.j2 @@ -111,7 +111,11 @@ management-client-user {{ openvpn_management_client_user }} {% if ansible_os_family == 'Debian' %} plugin /usr/lib/openvpn/openvpn-auth-ldap.so "{{ openvpn_base_dir }}/auth/ldap.conf" {% elif ansible_machine == "x86_64" %} +{% if ansible_distribution in ['RedHat','Rocky'] and (ansible_distribution_major_version | int >= 8) %} +plugin /usr/lib64/openvpn/plugins/openvpn-auth-ldap.so "{{ openvpn_base_dir }}/auth/ldap.conf" +{% else %} plugin /usr/lib64/openvpn/plugin/lib/openvpn-auth-ldap.so "{{ openvpn_base_dir }}/auth/ldap.conf" +{% endif %} {% else %} plugin /usr/lib/openvpn/plugin/lib/openvpn-auth-ldap.so "{{ openvpn_base_dir }}/auth/ldap.conf" {% endif %}