ansible-role-elasticsearch/tasks/xpack/security/elasticsearch-xpack-activation.yml
2019-10-11 17:16:35 +01:00

20 lines
644 B
YAML

---
- name: Activate ES license (with security authentication)
uri:
method: PUT
url: "{{ es_api_uri }}/_xpack/license?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
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'
- debug:
msg: "License: {{ license_activated }}"