Skip to content

Commit

Permalink
Merge pull request #215 from miguelwhite/master
Browse files Browse the repository at this point in the history
Add rhel6 support for ldap auth plugin
  • Loading branch information
luxflux authored Feb 13, 2017
2 parents 3a59c68 + d337aba commit f987b14
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
Concat["${etc_directory}/openvpn/${server}/download-configs/${name}.ovpn"],
File["${etc_directory}/openvpn/${server}/download-configs/${name}.tblk"],
],
before => Exec["tar the thing ${server} with ${name}"];
before => Exec["tar the thing ${server} with ${name}"];
}

file { "${etc_directory}/openvpn/${server}/download-configs/${name}/${name}.conf":
Expand Down
14 changes: 10 additions & 4 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,25 @@
$group = 'nobody'
$link_openssl_cnf = true
$pam_module_path = '/usr/lib64/openvpn/plugin/lib/openvpn-auth-pam.so'
$additional_packages = ['easy-rsa']
$easyrsa_source = '/usr/share/easy-rsa/2.0'
$namespecific_rclink = false

# Redhat/Centos >= 7.0
if(versioncmp($::operatingsystemrelease, '7.0') >= 0) and $::operatingsystem != 'Amazon' {
$additional_packages = ['easy-rsa']
$ldap_auth_plugin_location = undef
$systemd = true
# Redhat/Centos < 7
# Redhat/Centos == 6.0
} elsif(versioncmp($::operatingsystemrelease, '6.0') >= 0) and $::operatingsystem != 'Amazon' {
$additional_packages = ['easy-rsa','openvpn-auth-ldap']
$ldap_auth_plugin_location = '/usr/lib64/openvpn/plugin/lib/openvpn-auth-ldap.so'
$systemd = false
# Redhat/Centos < 6.0
} else {
$additional_packages = ['easy-rsa']
$ldap_auth_plugin_location = undef
$systemd = false
}

$ldap_auth_plugin_location = undef # no ldap plugin on redhat/centos
}
'Debian': { # Debian/Ubuntu
$etc_directory = '/etc'
Expand Down

0 comments on commit f987b14

Please sign in to comment.