ansible-role-elasticsearch/tasks/xpack/security/elasticsearch-xpack-activation.yml
2019-10-31 10:54:53 +00:00

21 lines
696 B
YAML

---
- name: Activate ES license (with security authentication)
uri:
method: PUT
url: "{{ es_api_uri }}/{{ es_license_api }}?acknowledge=true"
user: "{{es_api_basic_auth_username | default(omit)}}"
password: "{{es_api_basic_auth_password | default(omit)}}"
body_format: json
body: "{{ es_xpack_license }}"
return_content: yes
force_basic_auth: yes
validate_certs: "{{ es_validate_certs }}"
register: license_activated
no_log: True
failed_when: >
license_activated.status != 200 or
license_activated.json.license_status is not defined or
license_activated.json.license_status != 'valid'
- name: License
debug: msg={{ license_activated }}