Skip to content

Commit 9c57332

Browse files
committed
Set xpack config to enable authentication using username and password
1 parent 543c582 commit 9c57332

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

manifests/config.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165

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

170170
file { "${elasticsearch::configdir}/elasticsearch.yml":
171171
ensure => 'file',

manifests/init.pp

+4
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,9 @@
343343
# @param version
344344
# To set the specific version you want to install.
345345
#
346+
# @param password_enabled
347+
# To enable or disable password authentication.
348+
#
346349
# @author Richard Pijnenburg <[email protected]>
347350
# @author Tyler Langlois <[email protected]>
348351
# @author Gavin Williams <[email protected]>
@@ -436,6 +439,7 @@
436439
Boolean $restart_package_change = $restart_on_change,
437440
Boolean $restart_plugin_change = $restart_on_change,
438441
Stdlib::Filemode $logdir_mode = '2750',
442+
Boolean $password_enabled = false
439443
) {
440444
#### Validate parameters
441445

0 commit comments

Comments
 (0)