diff --git a/spec/acceptance/openvpn_spec.rb b/spec/acceptance/openvpn_spec.rb index 4c0ba2fd..14232e7f 100644 --- a/spec/acceptance/openvpn_spec.rb +++ b/spec/acceptance/openvpn_spec.rb @@ -4,14 +4,14 @@ case fact('osfamily') when 'RedHat' - if fact('os.release.major') == '8' - server_directory = '/etc/openvpn/server' - client_directory = '/etc/openvpn/client' - client_service = 'openvpn-client' - else + if fact('os.release.major') == '7' server_directory = '/etc/openvpn' client_directory = '/etc/openvpn' client_service = 'openvpn' + else + server_directory = '/etc/openvpn/server' + client_directory = '/etc/openvpn/client' + client_service = 'openvpn-client' end server_crt = "#{server_directory}/test_openvpn_server/easy-rsa/keys/issued/server.crt" key_path = "#{server_directory}/test_openvpn_server/easy-rsa/keys/private" diff --git a/spec/defines/openvpn_ca_spec.rb b/spec/defines/openvpn_ca_spec.rb index a578c3c1..1e1d4753 100644 --- a/spec/defines/openvpn_ca_spec.rb +++ b/spec/defines/openvpn_ca_spec.rb @@ -12,10 +12,10 @@ case facts[:os]['family'] when 'RedHat' - server_directory = if facts[:os]['release']['major'] == '8' - '/etc/openvpn/server' - else + server_directory = if facts[:os]['release']['major'] == '7' '/etc/openvpn' + else + '/etc/openvpn/server' end context 'creating a server with the minimum parameters' do diff --git a/spec/defines/openvpn_client_spec.rb b/spec/defines/openvpn_client_spec.rb index 99e6d731..29571f3c 100644 --- a/spec/defines/openvpn_client_spec.rb +++ b/spec/defines/openvpn_client_spec.rb @@ -22,10 +22,10 @@ server_directory = case facts[:os]['family'] when 'CentOS', 'RedHat' - if facts[:os]['release']['major'] == '8' - '/etc/openvpn/server' - else + if facts[:os]['release']['major'] == '7' '/etc/openvpn' + else + '/etc/openvpn/server' end else '/etc/openvpn' diff --git a/spec/defines/openvpn_client_specific_config_spec.rb b/spec/defines/openvpn_client_specific_config_spec.rb index 93ea09e1..9920e826 100644 --- a/spec/defines/openvpn_client_specific_config_spec.rb +++ b/spec/defines/openvpn_client_specific_config_spec.rb @@ -31,10 +31,10 @@ server_directory = case facts[:os]['family'] when 'CentOS', 'RedHat' - if facts[:os]['release']['major'] == '8' - '/etc/openvpn/server' - else + if facts[:os]['release']['major'] == '7' '/etc/openvpn' + else + '/etc/openvpn/server' end else '/etc/openvpn' diff --git a/spec/defines/openvpn_server_spec.rb b/spec/defines/openvpn_server_spec.rb index a7fcc539..444980fb 100644 --- a/spec/defines/openvpn_server_spec.rb +++ b/spec/defines/openvpn_server_spec.rb @@ -12,10 +12,10 @@ server_directory = case facts[:os]['family'] when 'CentOS', 'RedHat' - if facts[:os]['release']['major'] == '8' - '/etc/openvpn/server' - else + if facts[:os]['release']['major'] == '7' '/etc/openvpn' + else + '/etc/openvpn/server' end when %r{FreeBSD} '/usr/local/etc/openvpn'