Skip to content

Commit

Permalink
Set xpack config to enable authentication using username and password
Browse files Browse the repository at this point in the history
  • Loading branch information
miluxhd authored and milad-24 committed Sep 10, 2024
1 parent 543c582 commit 4188e4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@

# Generate Elasticsearch config
$data =
$elasticsearch::config + { 'path.data' => $elasticsearch::datadir } + { 'path.logs' => $elasticsearch::logdir } + $_tls_config
$elasticsearch::config + { 'path.data' => $elasticsearch::datadir } + { 'path.logs' => $elasticsearch::logdir } + { 'xpack.security.enabled' => $elasticsearch::password_enabled } + $_tls_config

file { "${elasticsearch::configdir}/elasticsearch.yml":
ensure => 'file',
Expand Down
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@
# @param version
# To set the specific version you want to install.
#
# @param password_enabled
# To enable or disable password authentication.
#
# @author Richard Pijnenburg <[email protected]>
# @author Tyler Langlois <[email protected]>
# @author Gavin Williams <[email protected]>
Expand Down Expand Up @@ -436,6 +439,7 @@
Boolean $restart_package_change = $restart_on_change,
Boolean $restart_plugin_change = $restart_on_change,
Stdlib::Filemode $logdir_mode = '2750',
Boolean $password_enabled = false
) {
#### Validate parameters

Expand Down

0 comments on commit 4188e4d

Please sign in to comment.