Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set xpack config to enable authentication using username and password #1235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ The following parameters are available in the `elasticsearch` class:
* [`users`](#-elasticsearch--users)
* [`validate_tls`](#-elasticsearch--validate_tls)
* [`version`](#-elasticsearch--version)
* [`password_enabled`](#-elasticsearch--password_enabled)

##### <a name="-elasticsearch--ensure"></a>`ensure`

Expand Down Expand Up @@ -805,6 +806,14 @@ Data type: `Variant[String, Boolean]`

To set the specific version you want to install.

##### <a name="-elasticsearch--password_enabled"></a>`password_enabled`

Data type: `Boolean`

To enable or disable password authentication.

Default value: `false`

### <a name="elasticsearch--config"></a>`elasticsearch::config`

This class exists to coordinate all configuration related actions,
Expand Down
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
Loading