From 31ac5e7671caa65227e05bbf8c6a3ec8b828ed0b Mon Sep 17 00:00:00 2001 From: Ben Magistro Date: Tue, 11 Jul 2023 18:03:10 +0000 Subject: [PATCH 1/2] fixes #1197 - add a managed file entry for jvm.options Signed-off-by: Ben Magistro --- manifests/config.pp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/manifests/config.pp b/manifests/config.pp index ecc45943d..0178834ca 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -181,6 +181,15 @@ mode => '0440', } + file { "${elasticsearch::configdir}/jvm.options": + ensure => 'file', + notify => $elasticsearch::_notify_service, + require => Class['elasticsearch::package'], + owner => $elasticsearch::elasticsearch_user, + group => $elasticsearch::elasticsearch_group, + mode => '0640', + } + if ($elasticsearch::version != false and versioncmp($elasticsearch::version, '7.7.0') >= 0) { # https://www.elastic.co/guide/en/elasticsearch/reference/master/advanced-configuration.html#set-jvm-options # https://github.com/elastic/elasticsearch/pull/51882 From 1e4a9f67c110e5caaf7b43df4bb3ff01f4a5395b Mon Sep 17 00:00:00 2001 From: Ben Magistro Date: Wed, 12 Jul 2023 15:27:33 +0000 Subject: [PATCH 2/2] add parameter for secrets keystore management Signed-off-by: Ben Magistro --- manifests/config.pp | 2 +- manifests/init.pp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/config.pp b/manifests/config.pp index 0178834ca..245541320 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -229,7 +229,7 @@ } # Add secrets to keystore - if $elasticsearch::secrets != undef { + if ($elasticsearch::manage_secrets and $elasticsearch::secrets != undef) { elasticsearch_keystore { 'elasticsearch_secrets': configdir => $elasticsearch::configdir, purge => $elasticsearch::purge_secrets, diff --git a/manifests/init.pp b/manifests/init.pp index e97ad1217..3fb45e5d5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -174,6 +174,9 @@ # @param manage_repo # Enable repo management by enabling official Elastic repositories. # +# @param manage_secrets +# Enable secret management through the use of elastic-keystore. +# # @param oss # Whether to use the purely open source Elasticsearch package distribution. # @@ -387,6 +390,7 @@ Boolean $manage_datadir, Boolean $manage_logdir, Boolean $manage_repo, + Boolean $manage_secrets, Boolean $oss, Stdlib::Absolutepath $package_dir, Integer $package_dl_timeout,