- Stop forcing es_xpack_features variable in order to let elasticsearch install default features described in http://localhost:9200/_xpack - Change xpack test scope to be able to test default xpack install - xpack scenario will test xpack install with default features - xpack upgrade scenario will fully test security feature - oss-to-xpack-upgrade will test installing only other specific features - Cleanup some duplicate serverspec tests - Remove `system_key`feature (deprecated in 5.6 and removed in 6.0 - [Breaking Changes 6.0.0](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking-6.0.0-xes.html)) - Cleanup some ansible code (especially in `when` conditions)
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
---
|
|
|
|
- name: Activate ES license (without security authentication)
|
|
uri:
|
|
method: PUT
|
|
url: "http://{{es_api_host}}:{{es_api_port}}/_xpack/license?acknowledge=true"
|
|
body_format: json
|
|
body: "{{ es_xpack_license }}"
|
|
return_content: yes
|
|
register: license_activated
|
|
no_log: True
|
|
when: es_api_basic_auth_username is not defined or es_api_basic_auth_password is not defined
|
|
failed_when: >
|
|
license_activated.status != 200 or
|
|
license_activated.json.license_status is not defined or
|
|
license_activated.json.license_status != 'valid'
|
|
|
|
- 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}}"
|
|
password: "{{es_api_basic_auth_password}}"
|
|
body_format: json
|
|
force_basic_auth: yes
|
|
body: "{{ es_xpack_license }}"
|
|
return_content: yes
|
|
register: license_activated
|
|
no_log: True
|
|
when: es_api_basic_auth_username is defined and es_api_basic_auth_password is defined
|
|
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 }}"
|