elasticsearch
: Manages the installation of Elasticsearch and related options.elasticsearch::config
: This class exists to coordinate all configuration related actions, functionality and logical units in a central place. It is not intended toelasticsearch::license
: A defined type to control Elasticsearch licenses.elasticsearch::package
: This class exists to coordinate all software package management related actions, functionality and logical units in a central place. It is nelasticsearch::service
: This class exists to coordinate all service management related actions, functionality and logical units in a central place. Note: "service
elasticsearch::component_template
: This define allows you to insert, update or delete Elasticsearch component templates. Template content should be defined through either thelasticsearch::ilm_policy
: This define allows you to insert, update or delete Elasticsearch ILM policies. Policy content should be defined through either the `contenelasticsearch::index
: A defined type to control Elasticsearch index-level settings.elasticsearch::index_template
: This define allows you to insert, update or delete Elasticsearch index templates (using new composable api). Template content should be deelasticsearch::pipeline
: This define allows you to insert, update or delete Elasticsearch index ingestion pipelines. Pipeline content should be defined through theelasticsearch::plugin
: This define allows you to install arbitrary Elasticsearch plugins either by using the default repositories or by specifying an URLelasticsearch::role
: Manage x-pack roles.elasticsearch::script
: This define allows you to insert, update or delete scripts that are used within Elasticsearch.elasticsearch::slm_policy
: This define allows you to insert, update or delete Elasticsearch SLM policies. Policy content should be defined through either the `contenelasticsearch::snapshot_repository
: This define allows you to insert, update or delete Elasticsearch snapshot repositories.elasticsearch::template
: This define allows you to insert, update or delete Elasticsearch index templates. Template content should be defined through either the `celasticsearch::user
: Manages x-pack users.
elasticsearch_component_template
: Manages Elasticsearch component templates.elasticsearch_ilm_policy
: Manages Elasticsearch ILM policies.elasticsearch_index
: Manages Elasticsearch index settings.elasticsearch_index_template
: Manages Elasticsearch index templates.elasticsearch_keystore
: Manages an Elasticsearch keystore settings file.elasticsearch_license
: Manages Elasticsearch licenses.elasticsearch_pipeline
: Manages Elasticsearch ingest pipelines.elasticsearch_plugin
: Plugin installation typeelasticsearch_role
: Type to model Elasticsearch roles.elasticsearch_role_mapping
: Type to model Elasticsearch role mappings.elasticsearch_slm_policy
: Manages Elasticsearch SLM policies.elasticsearch_snapshot_repository
: Manages Elasticsearch snapshot repositories.elasticsearch_template
: Manages Elasticsearch index templates.elasticsearch_user
: Type to model Elasticsearch users.elasticsearch_user_file
: Type to model Elasticsearch users.elasticsearch_user_roles
: Type to model Elasticsearch user roles.es_instance_conn_validator
: Verify that a connection can be successfully established between a node and Elasticsearch. It could potentially be used for other purposes su
array_suffix
: This function applies a suffix to all elements in an array. Examples: array_suffix(['a','b','c'], 'p') Will return: ['ap','bp','cp']concat_merge
: Merges two or more hashes together concatenating duplicate keys with array values and returns the resulting hash. For example: $hash1 =deep_implode
: Recursively flattens all keys of a hash into a dot-notated hash, deeply merging duplicate key values by natively combining them and returns tes_plugin_name
: Given a string, return the best guess at what the directory name will be for the given plugin. Any arguments past the first will be fallbacksplugin_dir
: Extracts the end plugin directory of the name
Top-level Elasticsearch class which may manage installation of the Elasticsearch package, package repository, and other global options and parameters.
class { 'elasticsearch': }
class { 'elasticsearch':
ensure => 'absent',
}
class { 'elasticsearch':
status => 'disabled',
}
The following parameters are available in the elasticsearch
class:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
autoupgrade
ca_certificate
certificate
config
configdir
configdir_recurselimit
daily_rolling_date_pattern
datadir
default_logging_level
defaults_location
deprecation_logging
deprecation_logging_level
download_tool
download_tool_insecure
download_tool_verify_certificates
elasticsearch_group
elasticsearch_user
file_rolling_type
homedir
indices
init_defaults
init_defaults_file
init_template
jvm_options
keystore_password
keystore_path
license
logdir
logdir_mode
logging_config
logging_file
logging_level
logging_template
manage_datadir
manage_logdir
manage_repo
oss
package_dir
package_dl_timeout
package_name
package_provider
package_url
pid_dir
pipelines
plugindir
plugins
private_key
private_key_type
proxy_url
purge_configdir
purge_package_dir
purge_secrets
repo_stage
restart_on_change
restart_config_change
restart_package_change
restart_plugin_change
roles
rolling_file_max_backup_index
rolling_file_max_file_size
scripts
secrets
security_logging_content
security_logging_source
service_name
service_provider
slm_policies
snapshot_repositories
ssl
status
system_key
systemd_service_path
templates
index_templates
component_templates
ilm_policies
users
validate_tls
version
Data type: Enum['absent', 'present']
Controls if the managed resources shall be present
or absent
.
If set to absent
, the managed software packages will be uninstalled, and
any traces of the packages will be purged as well as possible, possibly
including existing configuration files.
System modifications (if any) will be reverted as well as possible (e.g.
removal of created users, services, changed log settings, and so on).
This is a destructive parameter and should be used with care.
Data type: Optional[String]
Defines the default REST basic auth password for API authentication.
Data type: Optional[String]
Defines the default REST basic auth username for API authentication.
Data type: Optional[String]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Data type: Optional[String]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Data type: String
Default host to use when accessing Elasticsearch APIs.
Data type: Integer[0, 65535]
Default port to use when accessing Elasticsearch APIs.
Data type: Enum['http', 'https']
Default protocol to use when accessing Elasticsearch APIs.
Data type: Integer
Default timeout (in seconds) to use when accessing Elasticsearch APIs.
Data type: Boolean
If set to true
, any managed package will be upgraded on each Puppet run
when the package provider is able to find a newer version than the present
one. The exact behavior is provider dependent (see
{package, "upgradeable"}[http://j.mp/xbxmNP] in the Puppet documentation).
Data type: Optional[Stdlib::Absolutepath]
Path to the trusted CA certificate to add to this node's Java keystore.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Path to the certificate for this node signed by the CA listed in ca_certificate.
Default value: undef
Data type: Hash
Elasticsearch configuration hash.
Data type: Stdlib::Absolutepath
Directory containing the elasticsearch configuration.
Use this setting if your packages deviate from the norm (/etc/elasticsearch
)
Data type: Integer
Dictates how deeply the file copy recursion logic should descend when
copying files from the configdir
to instance configdir
s.
Data type: String
File pattern for the file appender log when file_rolling_type is 'dailyRollingFile'.
Data type: Elasticsearch::Multipath
Allows you to set the data directory of Elasticsearch.
Data type: String
Default logging level for Elasticsearch.
Default value: $logging_level
Data type: Optional[Stdlib::Absolutepath]
Absolute path to directory containing init defaults file.
Data type: Boolean
Whether to enable deprecation logging. If enabled, deprecation logs will be saved to ${cluster.name}_deprecation.log in the Elasticsearch log folder.
Data type: String
Default deprecation logging level for Elasticsearch.
Data type: Optional[String]
Command-line invocation with which to retrieve an optional package_url.
Data type: Optional[String]
Command-line invocation with which to retrieve an optional package_url when certificate verification should be ignored.
Data type: Boolean
Whether or not to verify SSL/TLS certificates when retrieving package files using a download tool instead of a package management provider.
Data type: String
The group Elasticsearch should run as. This also sets file group permissions.
Data type: String
The user Elasticsearch should run as. This also sets file ownership.
Data type: Enum['dailyRollingFile', 'rollingFile', 'file']
Configuration for the file appender rotation. It can be 'dailyRollingFile', 'rollingFile' or 'file'. The first rotates by name, the second one by size or third don't rotate automatically.
Data type: Stdlib::Absolutepath
Directory where the elasticsearch installation's files are kept (plugins, etc.)
Data type: Hash
Define indices via a hash. This is mainly used with Hiera's auto binding.
Data type: Hash
Defaults file content in hash representation.
Data type: Optional[String]
Defaults file as puppet resource.
Data type: String
Service file as a template.
Data type: Array[String]
Array of options to set in jvm_options.
Data type: Optional[String]
Password to encrypt this node's Java keystore.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Custom path to the Java keystore file. This parameter is optional.
Default value: undef
Data type: Optional[Variant[String, Hash]]
Optional Elasticsearch license in hash or string form.
Data type: Stdlib::Absolutepath
Directory that will be used for Elasticsearch logging.
Data type: Stdlib::Filemode
Mode directory that will be used for Elasticsearch logging (default 2750).
Default value: '2750'
Data type: Hash
Representation of information to be included in the log4j.properties file.
Data type: Optional[String]
Instead of a hash, you may supply a puppet://
file source for the
log4j.properties file.
Data type: String
Default logging level for Elasticsearch.
Data type: Optional[String]
Use a custom logging template - just supply the relative path, i.e.
$module/elasticsearch/logging.yml.erb
Data type: Boolean
Enable datadir management (default true).
Data type: Boolean
Enable logdir management (default true).
Data type: Boolean
Enable repo management by enabling official Elastic repositories.
Data type: Boolean
Whether to use the purely open source Elasticsearch package distribution.
Data type: Stdlib::Absolutepath
Directory where packages are downloaded to.
Data type: Integer
For http, https, and ftp downloads, you may set how long the exec resource may take.
Data type: String
Name Of the package to install.
Data type: Enum['package']
Method to install the packages, currently only package
is supported.
Data type: Optional[String]
URL of the package to download.
This can be an http, https, or ftp resource for remote packages, or a
puppet://
resource or file:/
for local packages
Data type: Optional[Stdlib::Absolutepath]
Directory where the elasticsearch process should write out its PID.
Data type: Hash
Define pipelines via a hash. This is mainly used with Hiera's auto binding.
Data type: Optional[Stdlib::Absolutepath]
Directory containing elasticsearch plugins. Use this setting if your packages deviate from the norm (/usr/share/elasticsearch/plugins)
Data type: Hash
Define plugins via a hash. This is mainly used with Hiera's auto binding.
Data type: Optional[Stdlib::Absolutepath]
Path to the key associated with this node's certificate.
Default value: undef
Data type: Enum['rsa','dsa','ec']
The type of the private key. Usually the private key is of type RSA key but it can also be an Elliptic Curve key (EC) or DSA.
Default value: 'rsa'
Data type: Optional[Stdlib::HTTPUrl]
For http and https downloads, you may set a proxy server to use. By default,
no proxy is used.
Format: proto://[user:pass@]server[:port]/
Data type: Boolean
Purge the config directory of any unmanaged files.
Data type: Boolean
Purge package directory on removal
Data type: Boolean
Whether or not keys present in the keystore will be removed if they are not present in the specified secrets hash.
Data type: Variant[Boolean, String]
Use stdlib stage setup for managing the repo instead of relationship ordering.
Data type: Boolean
Determines if the application should be automatically restarted
whenever the configuration, package, or plugins change. Enabling this
setting will cause Elasticsearch to restart whenever there is cause to
re-read configuration files, load new plugins, or start the service using an
updated/changed executable. This may be undesireable in highly available
environments. If all other restart_* parameters are left unset, the value of
restart_on_change
is used for all other restart_*_change defaults.
Data type: Boolean
Determines if the application should be automatically restarted whenever the configuration changes. This includes the Elasticsearch configuration file, any service files, and defaults files. Disabling automatic restarts on config changes may be desired in an environment where you need to ensure restarts occur in a controlled/rolling manner rather than during a Puppet run.
Default value: $restart_on_change
Data type: Boolean
Determines if the application should be automatically restarted whenever the package (or package version) for Elasticsearch changes. Disabling automatic restarts on package changes may be desired in an environment where you need to ensure restarts occur in a controlled/rolling manner rather than during a Puppet run.
Default value: $restart_on_change
Data type: Boolean
Determines if the application should be automatically restarted whenever plugins are installed or removed. Disabling automatic restarts on plugin changes may be desired in an environment where you need to ensure restarts occur in a controlled/rolling manner rather than during a Puppet run.
Default value: $restart_on_change
Data type: Hash
Define roles via a hash. This is mainly used with Hiera's auto binding.
Data type: Integer
Max number of logs to store whern file_rolling_type is 'rollingFile'
Data type: String
Max log file size when file_rolling_type is 'rollingFile'
Data type: Hash
Define scripts via a hash. This is mainly used with Hiera's auto binding.
Data type: Optional[Hash]
Optional default configuration hash of key/value pairs to store in the Elasticsearch keystore file. If unset, the keystore is left unmanaged.
Data type: Optional[String]
File content for x-pack logging configuration file (will be placed into log4j2.properties file).
Data type: Optional[String]
File source for x-pack logging configuration file (will be placed into log4j2.properties).
Data type: String
Elasticsearch service name
Data type: Enum['init', 'openbsd', 'openrc', 'systemd']
The service resource type provider to use when managing elasticsearch instances.
Data type: Hash
Define slm_policies via a hash. This is mainly used with Hiera's auto binding.
Default value: {}
Data type: Hash
Define snapshot repositories via a hash. This is mainly used with Hiera's auto binding.
Data type: Boolean
Whether to manage TLS certificates. Requires the ca_certificate, certificate, private_key and keystore_password parameters to be set.
Data type: Elasticsearch::Status
To define the status of the service. If set to enabled
, the service will
be run and will be started at boot time. If set to disabled
, the service
is stopped and will not be started at boot time. If set to running
, the
service will be run but will not be started at boot time. You may use this
to start a service on the first Puppet run instead of the system startup.
If set to unmanaged
, the service will not be started at boot time and Puppet
does not care whether the service is running or not. For example, this may
be useful if a cluster management software is used to decide when to start
the service plus assuring it is running on the desired node.
Data type: Optional[String]
Source for the x-pack system key. Valid values are any that are
supported for the file resource source
parameter.
Data type: Stdlib::Absolutepath
Path to the directory in which to install systemd service units.
Data type: Hash
Define templates via a hash. This is mainly used with Hiera's auto binding.
Data type: Hash
Define index_templates via a hash. This is mainly used with Hiera's auto binding.
Default value: {}
Data type: Hash
Define component_templates via a hash. This is mainly used with Hiera's auto binding.
Default value: {}
Data type: Hash
Define ilm_policies via a hash. This is mainly used with Hiera's auto binding.
Default value: {}
Data type: Hash
Define templates via a hash. This is mainly used with Hiera's auto binding.
Data type: Boolean
Enable TLS/SSL validation on API calls.
Data type: Variant[String, Boolean]
To set the specific version you want to install.
This class exists to coordinate all configuration related actions, functionality and logical units in a central place.
It is not intended to be used directly by external resources like node definitions or other modules.
@author Gavin Williams [email protected]
class { 'elasticsearch::config': }
A defined type to control Elasticsearch licenses.
The following parameters are available in the elasticsearch::license
class:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
content
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named pipeline should be present or absent in the cluster.
Default value: 'present'
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Variant[String, Hash]
License content in hash or string form.
Default value: $elasticsearch::license
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
This class exists to coordinate all software package management related actions, functionality and logical units in a central place.
It is not intended to be used directly by external resources like node definitions or other modules.
class { 'elasticsearch::package': }
This class exists to coordinate all service management related actions, functionality and logical units in a central place.
Note: "service" is the Puppet term and type for background processes in general and is used in a platform-independent way. E.g. "service" means "daemon" in relation to Unix-like systems.
This define allows you to insert, update or delete Elasticsearch component templates.
Template content should be defined through either the content
parameter
(when passing a hash or json string) or the source
parameter (when passing
the puppet file URI to a template json file).
The following parameters are available in the elasticsearch::component_template
defined type:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
content
source
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named component template should be present or absent in the cluster.
Default value: 'present'
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Optional[Variant[String, Hash]]
Contents of the template. Can be either a puppet hash or a string containing JSON.
Default value: undef
Data type: Optional[String]
Source path for the template file. Can be any value similar to source
values for file
resources.
Default value: undef
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
This define allows you to insert, update or delete Elasticsearch ILM policies.
Policy content should be defined through either the content
parameter
(when passing a hash or json string) or the source
parameter (when passing
the puppet file URI to a policy json file).
The following parameters are available in the elasticsearch::ilm_policy
defined type:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
content
source
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named ILM policy should be present or absent in the cluster.
Default value: 'present'
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Optional[Variant[String, Hash]]
Contents of the policy. Can be either a puppet hash or a string containing JSON.
Default value: undef
Data type: Optional[String]
Source path for the policy file. Can be any value similar to source
values for file
resources.
Default value: undef
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
A defined type to control Elasticsearch index-level settings.
The following parameters are available in the elasticsearch::index
defined type:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
settings
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named pipeline should be present or absent in the cluster.
Default value: 'present'
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Hash
Index settings in hash form (typically nested).
Default value: {}
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
This define allows you to insert, update or delete Elasticsearch index templates (using new composable api).
Template content should be defined through either the content
parameter
(when passing a hash or json string) or the source
parameter (when passing
the puppet file URI to a template json file).
The following parameters are available in the elasticsearch::index_template
defined type:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
content
source
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named index template should be present or absent in the cluster.
Default value: 'present'
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Optional[Variant[String, Hash]]
Contents of the template. Can be either a puppet hash or a string containing JSON.
Default value: undef
Data type: Optional[String]
Source path for the template file. Can be any value similar to source
values for file
resources.
Default value: undef
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
This define allows you to insert, update or delete Elasticsearch index ingestion pipelines.
Pipeline content should be defined through the content
parameter.
The following parameters are available in the elasticsearch::pipeline
defined type:
ensure
content
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named pipeline should be present or absent in the cluster.
Default value: 'present'
Data type: Hash
Contents of the pipeline in hash form.
Default value: {}
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
This define allows you to install arbitrary Elasticsearch plugins either by using the default repositories or by specifying an URL
elasticsearch::plugin {'mobz/elasticsearch-head': module_dir => 'head'}
elasticsearch::plugin { 'elasticsearch-jetty':
module_dir => 'elasticsearch-jetty',
url => 'https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.0.zip',
}
The following parameters are available in the elasticsearch::plugin
defined type:
ensure
configdir
java_opts
java_home
module_dir
proxy_host
proxy_password
proxy_port
proxy_username
source
url
Data type: Enum['absent', 'present']
Whether the plugin will be installed or removed. Set to 'absent' to ensure a plugin is not installed
Default value: 'present'
Data type: Stdlib::Absolutepath
Path to the elasticsearch configuration directory (ES_PATH_CONF) to which the plugin should be installed.
Default value: $elasticsearch::configdir
Data type: Array[String]
Array of Java options to be passed to ES_JAVA_OPTS
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Path to JAVA_HOME, if Java is installed in a non-standard location.
Default value: undef
Data type: Optional[String]
Directory name where the module has been installed This is automatically generated based on the module name Specify a value here to override the auto generated value
Default value: undef
Data type: Optional[String]
Proxy host to use when installing the plugin
Default value: undef
Data type: Optional[String]
Proxy auth password to use when installing the plugin
Default value: undef
Data type: Optional[Integer[0, 65535]]
Proxy port to use when installing the plugin
Default value: undef
Data type: Optional[String]
Proxy auth username to use when installing the plugin
Default value: undef
Data type: Optional[String]
Specify the source of the plugin. This will copy over the plugin to the node and use it for installation. Useful for offline installation
Default value: undef
Data type: Optional[Stdlib::HTTPUrl]
Specify an URL where to download the plugin from.
Default value: undef
Manage x-pack roles.
elasticsearch::role { 'power_user':
privileges => {
'cluster' => 'monitor',
'indices' => {
'*' => 'all',
},
},
mappings => [
"cn=users,dc=example,dc=com",
],
}
The following parameters are available in the elasticsearch::role
defined type:
Data type: Enum['absent', 'present']
Whether the role should be present or not. Set to 'absent' to ensure a role is not present.
Default value: 'present'
Data type: Array
A list of optional mappings defined for this role.
Default value: []
Data type: Hash
A hash of permissions defined for the role. Valid privilege settings can be found in the x-pack documentation.
Default value: {}
This define allows you to insert, update or delete scripts that are used within Elasticsearch.
The following parameters are available in the elasticsearch::script
defined type:
Data type: String
Controls the state of the script file resource to manage.
Values are simply passed through to the file
resource.
Default value: 'present'
Data type: Optional[Variant[Boolean, Enum['remote']]]
Will be passed through to the script file resource.
Default value: undef
Data type: String
Puppet source of the script
This define allows you to insert, update or delete Elasticsearch SLM policies.
Policy content should be defined through either the content
parameter
(when passing a hash or json string) or the source
parameter (when passing
the puppet file URI to a policy json file).
The following parameters are available in the elasticsearch::slm_policy
defined type:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
content
source
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named SLM policy should be present or absent in the cluster.
Default value: 'present'
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Optional[Variant[String, Hash]]
Contents of the policy. Can be either a puppet hash or a string containing JSON.
Default value: undef
Data type: Optional[String]
Source path for the policy file. Can be any value similar to source
values for file
resources.
Default value: undef
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
This define allows you to insert, update or delete Elasticsearch snapshot repositories.
The following parameters are available in the elasticsearch::snapshot_repository
defined type:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
repository_type
location
compress
chunk_size
max_restore_rate
max_snapshot_rate
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named index template should be present or absent in the cluster.
Default value: 'present'
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Optional[String]
Snapshot repository type.
Default value: undef
Data type: String
Location of snapshots. Mandatory
Data type: Boolean
Compress the snapshot metadata files?
Default value: true
Data type: Optional[String]
Chunk size to break big files down into.
Default value: undef
Data type: Optional[String]
Throttle value for node restore rate.
Default value: undef
Data type: Optional[String]
Throttle value for node snapshot rate.
Default value: undef
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
This define allows you to insert, update or delete Elasticsearch index templates.
Template content should be defined through either the content
parameter
(when passing a hash or json string) or the source
parameter (when passing
the puppet file URI to a template json file).
The following parameters are available in the elasticsearch::template
defined type:
ensure
api_basic_auth_password
api_basic_auth_username
api_ca_file
api_ca_path
api_host
api_port
api_protocol
api_timeout
content
source
validate_tls
Data type: Enum['absent', 'present']
Controls whether the named index template should be present or absent in the cluster.
Default value: 'present'
Data type: Optional[String]
HTTP basic auth password to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_password
Data type: Optional[String]
HTTP basic auth username to use when communicating over the Elasticsearch API.
Default value: $elasticsearch::api_basic_auth_username
Data type: Optional[Stdlib::Absolutepath]
Path to a CA file which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_file
Data type: Optional[Stdlib::Absolutepath]
Path to a directory with CA files which will be used to validate server certs when communicating with the Elasticsearch API over HTTPS.
Default value: $elasticsearch::api_ca_path
Data type: String
Host name or IP address of the ES instance to connect to.
Default value: $elasticsearch::api_host
Data type: Integer[0, 65535]
Port number of the ES instance to connect to
Default value: $elasticsearch::api_port
Data type: Enum['http', 'https']
Protocol that should be used to connect to the Elasticsearch API.
Default value: $elasticsearch::api_protocol
Data type: Integer
Timeout period (in seconds) for the Elasticsearch API.
Default value: $elasticsearch::api_timeout
Data type: Optional[Variant[String, Hash]]
Contents of the template. Can be either a puppet hash or a string containing JSON.
Default value: undef
Data type: Optional[String]
Source path for the template file. Can be any value similar to source
values for file
resources.
Default value: undef
Data type: Boolean
Determines whether the validity of SSL/TLS certificates received from the Elasticsearch API should be verified or ignored.
Default value: $elasticsearch::validate_tls
Manages x-pack users.
elasticsearch::user { 'bob':
password => 'foobar',
roles => ['logstash', 'kibana4'],
}
The following parameters are available in the elasticsearch::user
defined type:
Data type: Enum['absent', 'present']
Whether the user should be present or not.
Set to absent
to ensure a user is not installed
Default value: 'present'
Data type: String
Password for the given user. A plaintext password will be managed with the esusers utility and requires a refresh to update, while a hashed password from the esusers utility will be managed manually in the uses file.
Data type: Array
A list of roles to which the user should belong.
Default value: []
Manages Elasticsearch component templates.
The following properties are available in the elasticsearch_component_template
type.
Structured content of template.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_component_template
type.
namevar
Template name.
The specific backend to use for this elasticsearch_component_template
resource. You will seldom need to specify this
--- Puppet will usually discover the appropriate provider for your platform.
Puppet source to file containing template contents.
Manages Elasticsearch ILM policies.
The following properties are available in the elasticsearch_ilm_policy
type.
Structured content of policy.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_ilm_policy
type.
namevar
Policy name.
The specific backend to use for this elasticsearch_ilm_policy
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
Puppet source to file containing ILM policy contents.
Manages Elasticsearch index settings.
The following properties are available in the elasticsearch_index
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Structured settings for the index in hash form.
The following parameters are available in the elasticsearch_index
type.
namevar
Index name.
The specific backend to use for this elasticsearch_index
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
Manages Elasticsearch index templates.
The following properties are available in the elasticsearch_index_template
type.
Structured content of template.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_index_template
type.
namevar
Template name.
The specific backend to use for this elasticsearch_index_template
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
Puppet source to file containing template contents.
Manages an Elasticsearch keystore settings file.
The following properties are available in the elasticsearch_keystore
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
A key/value hash of settings names and values.
The following parameters are available in the elasticsearch_keystore
type.
Path to the elasticsearch configuration directory (ES_PATH_CONF).
Default value: /etc/elasticsearch
Elasticsearch instance this keystore belongs to.
The specific backend to use for this elasticsearch_keystore
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
Valid values: true
, false
, yes
, no
Whether to proactively remove settings that exist in the keystore but are not present in this resource's settings.
Default value: false
Manages Elasticsearch licenses.
The following properties are available in the elasticsearch_license
type.
Structured hash for license content data.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_license
type.
namevar
Pipeline name.
The specific backend to use for this elasticsearch_license
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
Manages Elasticsearch ingest pipelines.
The following properties are available in the elasticsearch_pipeline
type.
Structured content of pipeline.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_pipeline
type.
namevar
Pipeline name.
The specific backend to use for this elasticsearch_pipeline
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
Plugin installation type
The following properties are available in the elasticsearch_plugin
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_plugin
type.
configdir
elasticsearch_package_name
java_home
java_opts
name
plugin_dir
plugin_path
provider
proxy
source
url
Path to the elasticsearch configuration directory (ES_PATH_CONF).
Default value: /etc/elasticsearch
Name of the system Elasticsearch package.
Optional string to set the environment variable JAVA_HOME.
Optional array of Java options for ES_JAVA_OPTS.
Default value: []
namevar
An arbitrary name used as the identity of the resource.
Path to the Plugins directory
Default value: /usr/share/elasticsearch/plugins
Override name of the directory created for the plugin
The specific backend to use for this elasticsearch_plugin
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
Proxy Host
Source of the package. puppet:// or file:// resource
Url of the package
Type to model Elasticsearch roles.
The following properties are available in the elasticsearch_role
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Security privileges of the given role.
The following parameters are available in the elasticsearch_role
type.
Valid values: %r{^[a-zA-Z_]{1}[-\w@.$]{0,39}$}
namevar
Role name.
The specific backend to use for this elasticsearch_role
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Type to model Elasticsearch role mappings.
The following properties are available in the elasticsearch_role_mapping
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
List of role mappings.
The following parameters are available in the elasticsearch_role_mapping
type.
Valid values: %r{^[a-zA-Z_]{1}[-\w@.$]{0,39}$}
namevar
Role name.
The specific backend to use for this elasticsearch_role_mapping
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
Manages Elasticsearch SLM policies.
The following properties are available in the elasticsearch_slm_policy
type.
Structured content of policy.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_slm_policy
type.
namevar
Policy name.
The specific backend to use for this elasticsearch_slm_policy
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
Puppet source to file containing SLM policy contents.
Manages Elasticsearch snapshot repositories.
The following properties are available in the elasticsearch_snapshot_repository
type.
File chunk size
Compress the repository data
Default value: true
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Repository location
Maximum Restore rate
Maximum Snapshot rate
The following parameters are available in the elasticsearch_snapshot_repository
type.
namevar
Repository name.
The specific backend to use for this elasticsearch_snapshot_repository
resource. You will seldom need to specify this
--- Puppet will usually discover the appropriate provider for your platform.
Repository type
Default value: fs
Manages Elasticsearch index templates.
The following properties are available in the elasticsearch_template
type.
Structured content of template.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_template
type.
namevar
Template name.
The specific backend to use for this elasticsearch_template
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
Puppet source to file containing template contents.
Type to model Elasticsearch users.
The following properties are available in the elasticsearch_user
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the elasticsearch_user
type.
Path to the elasticsearch configuration directory (ES_PATH_CONF).
namevar
User name.
Plaintext password for user.
Required features: manages_plaintext_passwords.
The specific backend to use for this elasticsearch_user
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Type to model Elasticsearch users.
The following properties are available in the elasticsearch_user_file
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Valid values: %r{^[$]2a[$].{56}$}
Hashed password for user.
The following parameters are available in the elasticsearch_user_file
type.
Path to the elasticsearch configuration directory (ES_PATH_CONF).
namevar
User name.
The specific backend to use for this elasticsearch_user_file
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
Type to model Elasticsearch user roles.
The following properties are available in the elasticsearch_user_roles
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Array of roles that the user should belong to.
The following parameters are available in the elasticsearch_user_roles
type.
namevar
User name.
The specific backend to use for this elasticsearch_user_roles
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
Verify that a connection can be successfully established between a node and Elasticsearch. It could potentially be used for other purposes such as monitoring.
The following properties are available in the es_instance_conn_validator
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the es_instance_conn_validator
type.
namevar
An arbitrary name used as the identity of the resource.
The port that the Elasticsearch instance should be listening on.
Default value: 9200
The specific backend to use for this es_instance_conn_validator
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
DNS name or IP address of the server where Elasticsearch should be running.
Default value: localhost
The number of seconds that the validator should wait before retrying the connection to Elasticsearch; defaults to 10 seconds.
Default value: 10
The max number of seconds that the validator should wait before giving up and deciding that Elasticsearch is not running; defaults to 60 seconds.
Default value: 60
Type: Ruby 3.x API
This function applies a suffix to all elements in an array.
Examples:
array_suffix(['a','b','c'], 'p')
Will return: ['ap','bp','cp']
This function applies a suffix to all elements in an array.
Examples:
array_suffix(['a','b','c'], 'p')
Will return: ['ap','bp','cp']
Returns: Any
Array
Type: Ruby 3.x API
Merges two or more hashes together concatenating duplicate keys with array values and returns the resulting hash.
For example:
$hash1 = {'a' => [1]}
$hash2 = {'a' => [2]}
concat_merge($hash1, $hash2)
# The resulting hash is equivalent to:
# { 'a' => [1, 2] }
When there is a duplicate key that is not an array, the key in the rightmost hash will "win."
Merges two or more hashes together concatenating duplicate keys with array values and returns the resulting hash.
For example:
$hash1 = {'a' => [1]}
$hash2 = {'a' => [2]}
concat_merge($hash1, $hash2)
# The resulting hash is equivalent to:
# { 'a' => [1, 2] }
When there is a duplicate key that is not an array, the key in the rightmost hash will "win."
Returns: Any
String
Type: Ruby 3.x API
Recursively flattens all keys of a hash into a dot-notated hash, deeply merging duplicate key values by natively combining them and returns the resulting hash.
That is confusing, look at the examples for more clarity.
For example:
$hash = {'top' => {'sub' => [1]}, 'top.sub' => [2] }
$flattened_hash = deep_implode($hash)
# The resulting hash is equivalent to:
# { 'top.sub' => [1, 2] }
When the function encounters array or hash values, they are concatenated or merged, respectively. When duplace paths for a key are generated, the function will prefer to retain keys with the longest root key.
Recursively flattens all keys of a hash into a dot-notated hash, deeply merging duplicate key values by natively combining them and returns the resulting hash.
That is confusing, look at the examples for more clarity.
For example:
$hash = {'top' => {'sub' => [1]}, 'top.sub' => [2] }
$flattened_hash = deep_implode($hash)
# The resulting hash is equivalent to:
# { 'top.sub' => [1, 2] }
When the function encounters array or hash values, they are concatenated or merged, respectively. When duplace paths for a key are generated, the function will prefer to retain keys with the longest root key.
Returns: Any
Hash
Type: Ruby 3.x API
Given a string, return the best guess at what the directory name will be for the given plugin. Any arguments past the first will be fallbacks (using the same logic) should the first fail.
For example, all the following return values are "plug":
es_plugin_name('plug')
es_plugin_name('foo/plug')
es_plugin_name('foo/plug/1.0.0')
es_plugin_name('foo/elasticsearch-plug')
es_plugin_name('foo/es-plug/1.3.2')
Given a string, return the best guess at what the directory name will be for the given plugin. Any arguments past the first will be fallbacks (using the same logic) should the first fail.
For example, all the following return values are "plug":
es_plugin_name('plug')
es_plugin_name('foo/plug')
es_plugin_name('foo/plug/1.0.0')
es_plugin_name('foo/elasticsearch-plug')
es_plugin_name('foo/es-plug/1.3.2')
Returns: Any
String
Type: Ruby 3.x API
Extracts the end plugin directory of the name
Extracts the end plugin directory of the name
Returns: Any
String
The Elasticsearch::Multipath data type.
Alias of Variant[Array[Stdlib::Absolutepath], Stdlib::Absolutepath]
The Elasticsearch::Status data type.
Alias of Enum['enabled', 'disabled', 'running', 'unmanaged']