Defined Type: elasticsearch::user
- Defined in:
- manifests/user.pp
Overview
Manages x-pack users.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'manifests/user.pp', line 25
define elasticsearch::user (
String $password,
Enum['absent', 'present'] $ensure = 'present',
Array $roles = [],
) {
if $password =~ /^\$2a\$/ {
elasticsearch_user_file { $name:
ensure => $ensure,
configdir => $elasticsearch::configdir,
hashed_password => $password,
before => Elasticsearch_user_roles[$name],
}
} else {
elasticsearch_user { $name:
ensure => $ensure,
configdir => $elasticsearch::configdir,
password => $password,
before => Elasticsearch_user_roles[$name],
}
}
elasticsearch_user_roles { $name:
ensure => $ensure,
roles => $roles,
}
}
|