Skip to content

Commit

Permalink
Set defaults to ES7+
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper Aikema authored and h-haaks committed Feb 21, 2024
1 parent 167ea14 commit 5060816
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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':
Expand Down

0 comments on commit 5060816

Please sign in to comment.