ansible-role-elasticsearch/tasks/xpack/security/elasticsearch-xpack-activation.yml
Michael Russell 582c79c607
Add back in force_basic_auth for all http requests
Related: #576
This is needed when using security for 6.x. All other http requests
still have this parameter added.
2019-07-09 21:26:10 +02:00

20 lines
666 B
YAML

---
- name: Activate ES license (with security authentication)
uri:
method: PUT
url: "http://{{es_api_host}}:{{es_api_port}}/_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 }}"