Skip to content

Commit

Permalink
Merge pull request #1211 from asusk7m550/master
Browse files Browse the repository at this point in the history
Use Elasticsearch 7+ as default for configuration
  • Loading branch information
h-haaks authored Feb 21, 2024
2 parents 167ea14 + 5060816 commit 12d743f
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 12d743f

Please sign in to comment.