File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Manage shield/ x-pack roles.
1+ # Manage x-pack roles.
22#
33# @param ensure
44# Whether the role should be present or not.
99#
1010# @param privileges
1111# A hash of permissions defined for the role. Valid privilege settings can
12- # be found in the Shield/ x-pack documentation.
12+ # be found in the x-pack documentation.
1313#
1414# @example create and manage the role 'power_user' mapped to an LDAP group.
1515# elasticsearch::role { 'power_user':
2525# }
2626#
2727# @author Tyler Langlois <tyler.langlois@elastic.co>
28+ # @author Gavin Williams <gavin.williams@elastic.co>
2829#
2930define elasticsearch::role (
3031 Enum['absent', 'present'] $ensure = ' present' ,
3132 Array $mappings = [],
3233 Hash $privileges = {},
3334) {
3435 validate_slength($name , 30, 1)
35- if $elasticsearch::security_plugin == undef {
36- fail(" \" ${elasticsearch::security_plugin} \" required" )
37- }
3836
3937 if empty($privileges ) or $ensure == ' absent' {
4038 $_role_ensure = ' absent'
Original file line number Diff line number Diff line change 1- # Manages shield/ x-pack users.
1+ # Manages x-pack users.
22#
33# @example creates and manage a user with membership in the 'logstash' and 'kibana4' roles.
44# elasticsearch::user { 'bob':
2020# A list of roles to which the user should belong.
2121#
2222# @author Tyler Langlois <tyler.langlois@elastic.co>
23+ # @author Gavin Williams <gavin.williams@elastic.co>
2324#
2425define elasticsearch::user (
2526 String $password ,
2627 Enum['absent', 'present'] $ensure = ' present' ,
2728 Array $roles = [],
2829) {
29- if $elasticsearch::security_plugin == undef {
30- fail(" \" ${elasticsearch::security_plugin} \" required" )
31- }
32-
3330 if $password =~ /^\$2a\$/ {
3431 elasticsearch_user_file { $name:
3532 ensure => $ensure ,
You can’t perform that action at this time.
0 commit comments