From 5060816b93c35ed431135917b201cf904e35f210 Mon Sep 17 00:00:00 2001 From: Jasper Aikema Date: Fri, 9 Feb 2024 11:24:59 +0100 Subject: [PATCH] Set defaults to ES7+ --- manifests/config.pp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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':