forked from elastic/elasticsearch
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request elastic#223 from gingerwizard/master
Support for Activating License
- Loading branch information
Showing
21 changed files
with
93 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.kitchen/ | ||
license.json | ||
*.pyc | ||
.vendor | ||
.bundle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: Ensure elasticsearch is started | ||
service: name={{instance_init_script | basename}} state=started enabled=yes | ||
|
||
- name: Wait for elasticsearch to startup | ||
wait_for: host={{es_api_host}} port={{es_api_port}} delay=10 | ||
|
||
- name: activate-license | ||
include: ./handlers/shield/elasticsearch-xpack-activation.yml | ||
when: es_enable_xpack and es_xpack_license is defined and es_xpack_license != '' | ||
|
||
- name: load-native-realms | ||
include: ./handlers/shield/elasticsearch-shield-native.yml | ||
when: (es_users is defined and es_users.native is defined) or (es_roles is defined and es_roles.native is defined) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
|
||
- name: Activate ES license (without shield authentication) | ||
uri: | ||
method: PUT | ||
url: "http://{{es_api_host}}:{{es_api_port}}/_license?acknowledge=true" | ||
body_format: json | ||
body: "{{ es_xpack_license }}" | ||
return_content: yes | ||
register: license_activated | ||
no_log: True | ||
when: not '"shield" in es_xpack_features' | ||
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 shield authentication) | ||
uri: | ||
method: PUT | ||
url: "http://{{es_api_host}}:{{es_api_port}}/_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: '"shield" in es_xpack_features' | ||
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.content }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters