-
Notifications
You must be signed in to change notification settings - Fork 855
Another 6.x support pull request #408
Changes from all commits
9a7881a
90d4599
e0a063c
3076ed9
78628ee
e9850af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,24 @@ | |
- es_enable_xpack and '"security" in es_xpack_features' | ||
- (es_users is defined and es_users.file is defined) or (es_roles is defined and es_roles.file is defined) or (es_role_mapping is defined) | ||
|
||
#-----------------------------Create Bootstrap User----------------------------------- | ||
- name: Check if bootstrap password is set | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This section causes issues on my setup, when xpack is set to disabled due to the keystore not existing. Should this block of code ever be hit when xpack is not installed? Should we block it with a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gregdurham just his this issue too. Your suggestion will work and think its the way to go. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I am making those changes, I encountered the same in further testing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||
command: > | ||
{{es_home}}/bin/elasticsearch-keystore list | ||
register: list_keystore | ||
environment: | ||
ES_PATH_CONF: "{{ conf_dir }}" | ||
when: | ||
- (es_enable_xpack and '"security" in es_xpack_features') and (es_version | version_compare('6.0.0', '>')) | ||
|
||
- name: Create Bootstrap password for elastic user | ||
shell: echo "{{es_api_basic_auth_password}}" | {{es_home}}/bin/elasticsearch-keystore add -x 'bootstrap.password' | ||
when: | ||
- (es_enable_xpack and '"security" in es_xpack_features') and (es_version | version_compare('6.0.0', '>')) and es_api_basic_auth_username is defined and list_keystore is defined and es_api_basic_auth_username == 'elastic' and 'bootstrap.password' not in list_keystore.stdout_lines | ||
environment: | ||
ES_PATH_CONF: "{{ conf_dir }}" | ||
no_log: true | ||
|
||
#-----------------------------FILE BASED REALM---------------------------------------- | ||
|
||
- include: elasticsearch-security-file.yml | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this shell have
failed_when: False
? Looking at the below taskcorrect java version selected
which hasansible_os_family == 'RedHat' and java_full_path is defined
makes it sound like this task should only run for RedHat families but also allow failures in the event that1.8.0
isn't available.When running the tests for Ubuntu 16.04 this fails as the only available path is
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
.I would suggest something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixed! I somehow missed a check for RedHat.