diff --git a/manifests/config.pp b/manifests/config.pp index 47c11c2e6..f4316ce91 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -100,7 +100,15 @@ } # Set the correct xpack. settings based on ES version - if ($elasticsearch::version != false and versioncmp($elasticsearch::version, '7') >= 0) { + if ($elasticsearch::version != false and versioncmp($elasticsearch::version, '7') < 0) { + $_tls_config = { + 'xpack.security.transport.ssl.enabled' => true, + 'xpack.security.http.ssl.enabled' => true, + 'xpack.ssl.keystore.path' => $_keystore_path, + 'xpack.ssl.keystore.password' => $elasticsearch::keystore_password, + } + } + else { $_tls_config = { 'xpack.security.http.ssl.enabled' => true, 'xpack.security.http.ssl.keystore.path' => $_keystore_path, @@ -110,14 +118,6 @@ 'xpack.security.transport.ssl.keystore.password' => $elasticsearch::keystore_password, } } - else { - $_tls_config = { - 'xpack.security.transport.ssl.enabled' => true, - 'xpack.security.http.ssl.enabled' => true, - 'xpack.ssl.keystore.path' => $_keystore_path, - 'xpack.ssl.keystore.password' => $elasticsearch::keystore_password, - } - } # Trust CA Certificate java_ks { 'elasticsearch_ca':