21 lines
690 B
YAML
21 lines
690 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
|
|
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 }}
|