Add option to enable xpack trial

This commit is contained in:
pemontto 2019-10-18 16:54:46 +01:00
parent 8d72d86ab8
commit 57fa4e5176
No known key found for this signature in database
GPG key ID: EDCB93C3DA1B5DA9
4 changed files with 25 additions and 2 deletions

View file

@ -17,5 +17,5 @@
license_activated.json.license_status is not defined or
license_activated.json.license_status != 'valid'
- debug:
msg: "License: {{ license_activated }}"
- name: License
debug: msg={{ license_activated }}

View file

@ -0,0 +1,18 @@
---
- name: Activate ES trial license (with security authentication)
uri:
method: POST
url: "{{ es_api_uri }}/_{{ 'xpack/' if es_version is version_compare('7.0.0', '<') else '' }}license/start_trial?acknowledge=true"
user: "{{es_api_basic_auth_username | default(omit)}}"
password: "{{es_api_basic_auth_password | default(omit)}}"
return_content: yes
force_basic_auth: yes
status_code:
- 200
- 403
validate_certs: "{{ es_validate_certs }}"
register: trial_license_activated
when: es_xpack_trial
- name: Trial license
debug: msg={{ trial_license_activated }}