From a2939b5ebb7ba2239388b09a5f53e1f2ae909f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20L=C3=A9on?= Date: Tue, 30 Sep 2014 16:07:24 +0000 Subject: [PATCH 1/2] Fix RHEL 7 does not have openvpn-auth-ldap package --- manifests/params.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index c7d62d81..44408697 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -28,10 +28,14 @@ # http://docs.puppetlabs.com/references/latest/function.html#versioncmp if(versioncmp($::operatingsystemrelease, '6.4') < 0) { # Version < 6.4 $easyrsa_source = '/usr/share/openvpn/easy-rsa/2.0' - } else { # Version >= 6.4 + } elsif(versioncmp($::operatingsystemrelease, '6.4') < 0) and + (versioncmp($::operatingsystemrelease, '7.0') < 0) { # Version >= 6.4 < 7.0 $additional_packages = ['easy-rsa', 'openvpn-auth-ldap'] $easyrsa_source = '/usr/share/easy-rsa/2.0' $ldap_auth_plugin_location = '/usr/lib64/openvpn/plugin/lib/openvpn-auth-ldap.so' + } else { # Version >= 6.4 < 7.0 + $additional_packages = ['easy-rsa'] + $easyrsa_source = '/usr/share/easy-rsa/2.0' } } else { # Redhat/CentOS < 6 $easyrsa_source = '/usr/share/doc/openvpn/examples/easy-rsa/2.0' From 84c71afeae93deae1f97a79cf088d5d8aacfc6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20L=C3=A9on?= Date: Thu, 9 Oct 2014 23:42:26 +0200 Subject: [PATCH 2/2] Fix error in version check. Fix comment --- manifests/params.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 44408697..465ab147 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -28,12 +28,12 @@ # http://docs.puppetlabs.com/references/latest/function.html#versioncmp if(versioncmp($::operatingsystemrelease, '6.4') < 0) { # Version < 6.4 $easyrsa_source = '/usr/share/openvpn/easy-rsa/2.0' - } elsif(versioncmp($::operatingsystemrelease, '6.4') < 0) and + } elsif(versioncmp($::operatingsystemrelease, '6.4') > 0) and (versioncmp($::operatingsystemrelease, '7.0') < 0) { # Version >= 6.4 < 7.0 $additional_packages = ['easy-rsa', 'openvpn-auth-ldap'] $easyrsa_source = '/usr/share/easy-rsa/2.0' $ldap_auth_plugin_location = '/usr/lib64/openvpn/plugin/lib/openvpn-auth-ldap.so' - } else { # Version >= 6.4 < 7.0 + } else { # Version >= 7.0 $additional_packages = ['easy-rsa'] $easyrsa_source = '/usr/share/easy-rsa/2.0' }