Added changes to add required functionality and fix a bug
This commit is contained in:
parent
d1348a4ab6
commit
34f08130e1
3 changed files with 24 additions and 5 deletions
|
|
@ -25,10 +25,6 @@
|
|||
- { repo: "{{ es_apt_url }}", state: "present" }
|
||||
when: es_use_repository
|
||||
|
||||
- name: Debian - Include versionlock
|
||||
include: elasticsearch-Debian-version-lock.yml
|
||||
when: es_version_lock
|
||||
|
||||
- name: Debian - Ensure elasticsearch is installed
|
||||
become: yes
|
||||
apt: name=elasticsearch{% if es_version is defined and es_version != "" %}={{ es_version }}{% endif %} state=present force={{force_install}} allow_unauthenticated={{ 'no' if es_apt_key else 'yes' }} cache_valid_time=86400
|
||||
|
|
@ -36,6 +32,10 @@
|
|||
register: debian_elasticsearch_install_from_repo
|
||||
notify: restart elasticsearch
|
||||
|
||||
- name: Debian - Include versionlock
|
||||
include: elasticsearch-Debian-version-lock.yml
|
||||
when: es_version_lock
|
||||
|
||||
- name: Debian - Download elasticsearch from url
|
||||
get_url: url={% if es_custom_package_url is defined %}{{ es_custom_package_url }}{% else %}{{ es_package_url }}-{{ es_version }}.deb{% endif %} dest=/tmp/elasticsearch-{{ es_version }}.deb validate_certs=no
|
||||
when: not es_use_repository
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: set fact es_version_changed
|
||||
set_fact: es_version_changed={{ ((elasticsearch_install_from_package is defined and ((debian_elasticsearch_install_from_repo is defined and debian_elasticsearch_install_from_repo.changed) or (redhat_elasticsearch_install_from_repo is defined and redhat_elasticsearch_install_from_repo.changed))) or (elasticsearch_install_from_package is defined and elasticsearch_install_from_package.changed)) }}
|
||||
set_fact: es_version_changed={{ ((elasticsearch_install_from_package is defined and (debian_elasticsearch_install_from_repo.changed or redhat_elasticsearch_install_from_repo.changed)) or (elasticsearch_install_from_package is defined and elasticsearch_install_from_package.changed)) }}
|
||||
|
||||
- name: include elasticsearch-xpack-install.yml
|
||||
include: elasticsearch-xpack-install.yml
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ path.data: {{ data_dirs | array_to_str }}
|
|||
|
||||
path.logs: {{ log_dir }}
|
||||
|
||||
path.repo: {{ path_repo }}
|
||||
|
||||
action.auto_create_index: {{ action_auto_create_index }}
|
||||
|
||||
{% if es_enable_xpack %}
|
||||
{% if not "security" in es_xpack_features %}
|
||||
xpack.security.enabled: false
|
||||
|
|
@ -44,3 +48,18 @@ xpack.ml.enabled: false
|
|||
xpack.graph.enabled: false
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if es_mail_config['account'] is defined %}
|
||||
xpack.notification.email:
|
||||
account:
|
||||
{{ es_mail_config['account'] }}:
|
||||
profile: {{ es_mail_config['profile'] }}
|
||||
email_defaults:
|
||||
from: {{ es_mail_config['from'] }}
|
||||
smtp:
|
||||
auth: {{ es_mail_config['require_auth'] }}
|
||||
host: {{ es_mail_config['host'] }}
|
||||
port: {{ es_mail_config['port'] }}
|
||||
user: {{ es_mail_config['user'] }}
|
||||
password: {{ es_mail_config['pass'] }}
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue