Skip to content

Commit

Permalink
Merge pull request #214 from jkroepke/patch-1
Browse files Browse the repository at this point in the history
Fix Unknown variable: '::openvpn::params::namespecific_rclink' on non bsd systems
  • Loading branch information
luxflux authored Sep 25, 2016
2 parents 4e32fd4 + f8e0901 commit 4af8c2d
Showing 1 changed file with 43 additions and 39 deletions.
82 changes: 43 additions & 39 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@

case $::osfamily {
'RedHat': {
$etc_directory = '/etc'
$root_group = 'root'
$group = 'nobody'
$link_openssl_cnf = true
$pam_module_path = '/usr/lib64/openvpn/plugin/lib/openvpn-auth-pam.so'
$etc_directory = '/etc'
$root_group = 'root'
$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'
$easyrsa_source = '/usr/share/easy-rsa/2.0'
$namespecific_rclink = false

# Redhat/Centos >= 7.0
if(versioncmp($::operatingsystemrelease, '7.0') >= 0) and $::operatingsystem != 'Amazon' {
Expand All @@ -37,53 +38,54 @@
$ldap_auth_plugin_location = undef # no ldap plugin on redhat/centos
}
'Debian': { # Debian/Ubuntu
$etc_directory = '/etc'
$root_group = 'root'
$group = 'nogroup'
$link_openssl_cnf = true
$pam_module_path = '/usr/lib/openvpn/openvpn-auth-pam.so'
$etc_directory = '/etc'
$root_group = 'root'
$group = 'nogroup'
$link_openssl_cnf = true
$pam_module_path = '/usr/lib/openvpn/openvpn-auth-pam.so'
$namespecific_rclink = false

case $::operatingsystem {
'Debian': {
# Version > 8.0, jessie
if(versioncmp($::operatingsystemrelease, '8.0') >= 0) {
$additional_packages = ['easy-rsa','openvpn-auth-ldap']
$easyrsa_source = '/usr/share/easy-rsa/'
$additional_packages = ['easy-rsa','openvpn-auth-ldap']
$easyrsa_source = '/usr/share/easy-rsa/'
$ldap_auth_plugin_location = '/usr/lib/openvpn/openvpn-auth-ldap.so'
$systemd = true
$systemd = true

# Version > 7.0, wheezy
} elsif(versioncmp($::operatingsystemrelease, '7.0') >= 0) {
$additional_packages = ['openvpn-auth-ldap']
$easyrsa_source = '/usr/share/doc/openvpn/examples/easy-rsa/2.0'
$additional_packages = ['openvpn-auth-ldap']
$easyrsa_source = '/usr/share/doc/openvpn/examples/easy-rsa/2.0'
$ldap_auth_plugin_location = '/usr/lib/openvpn/openvpn-auth-ldap.so'
$systemd = false
$systemd = false
} else {
$additional_packages = undef
$easyrsa_source = '/usr/share/doc/openvpn/examples/easy-rsa/2.0'
$additional_packages = undef
$easyrsa_source = '/usr/share/doc/openvpn/examples/easy-rsa/2.0'
$ldap_auth_plugin_location = undef
$systemd = false
$systemd = false
}
}
'Ubuntu': {
# Version > 15.04, vivid
if(versioncmp($::operatingsystemrelease, '15.04') >= 0){
$additional_packages = ['easy-rsa','openvpn-auth-ldap']
$easyrsa_source = '/usr/share/easy-rsa/'
$additional_packages = ['easy-rsa','openvpn-auth-ldap']
$easyrsa_source = '/usr/share/easy-rsa/'
$ldap_auth_plugin_location = '/usr/lib/openvpn/openvpn-auth-ldap.so'
$systemd = true
$systemd = true

# Version > 13.10, saucy
} elsif(versioncmp($::operatingsystemrelease, '13.10') >= 0) {
$additional_packages = ['easy-rsa','openvpn-auth-ldap']
$easyrsa_source = '/usr/share/easy-rsa/'
$additional_packages = ['easy-rsa','openvpn-auth-ldap']
$easyrsa_source = '/usr/share/easy-rsa/'
$ldap_auth_plugin_location = '/usr/lib/openvpn/openvpn-auth-ldap.so'
$systemd = false
$systemd = false
} else {
$additional_packages = undef
$easyrsa_source = '/usr/share/doc/openvpn/examples/easy-rsa/2.0'
$additional_packages = undef
$easyrsa_source = '/usr/share/doc/openvpn/examples/easy-rsa/2.0'
$ldap_auth_plugin_location = undef
$systemd = false
$systemd = false
}
}
default: {
Expand All @@ -98,21 +100,23 @@
$easyrsa_source = '/usr/share/easy-rsa/'
$group = 'nobody'
$ldap_auth_plugin_location = undef # unsupported
$link_openssl_cnf = true
$systemd = true
$link_openssl_cnf = true
$systemd = true
$namespecific_rclink = false
}
'Linux': {
case $::operatingsystem {
'Amazon': {
$etc_directory = '/etc'
$root_group = 'root'
$group = 'nobody'
$additional_packages = ['easy-rsa']
$easyrsa_source = '/usr/share/easy-rsa/2.0'
$etc_directory = '/etc'
$root_group = 'root'
$group = 'nobody'
$additional_packages = ['easy-rsa']
$easyrsa_source = '/usr/share/easy-rsa/2.0'
$ldap_auth_plugin_location = undef
$systemd = false
$link_openssl_cnf = true
$pam_module_path = '/usr/lib/openvpn/openvpn-auth-pam.so'
$systemd = false
$link_openssl_cnf = true
$pam_module_path = '/usr/lib/openvpn/openvpn-auth-pam.so'
$namespecific_rclink = false
}
default: {
fail("Unsupported OS/Distribution ${::osfamily}/${::operatingsystem}")
Expand Down

0 comments on commit 4af8c2d

Please sign in to comment.