feat: manage role
This commit is contained in:
parent
30f4484bd6
commit
98769717c4
7 changed files with 173 additions and 3 deletions
tasks
|
@ -6,6 +6,20 @@
|
|||
run_once: true
|
||||
tags: elasticsearch
|
||||
|
||||
- name: Manage roles
|
||||
elasticsearch_role:
|
||||
name: "{{ item.key }}"
|
||||
cluster: "{{ item.value.cluster | default(omit) }}"
|
||||
indices: "{{ item.value.indices | default(omit) }}"
|
||||
api_user: "{{ elasticsearch_api_user }}"
|
||||
api_password: "{{ elasticsearch_password }}"
|
||||
state: "{{ item.value.state | default('present') }}"
|
||||
loop: "{{ elasticsearch_roles | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
run_once: true
|
||||
tags: elasticsearch
|
||||
|
||||
- name: Manage users
|
||||
elasticsearch_user:
|
||||
name: "{{ item.key }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue