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

Fix Unknown variable: '::openvpn::params::namespecific_rclink' on non bsd systems #214

Merged
merged 1 commit into from
Sep 25, 2016
Merged
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
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