Fix deb and rpm url (#788)
* Fix commit fix the deb package url for Elasticsearch 6.x * Fix commit fix the rpm package url for Elasticsearch 6.x and 7.x * Download deb package directly using apt module * Use new ansible syntax
This commit is contained in:
parent
4f01bc74a0
commit
3904913be5
3 changed files with 15 additions and 7 deletions
|
|
@ -54,9 +54,15 @@
|
|||
environment:
|
||||
ES_PATH_CONF: "{{ es_conf_dir }}"
|
||||
|
||||
# workaround due to https://github.com/ansible/ansible/issues/66977
|
||||
- set_fact:
|
||||
es_rpm_url: "{% if es_version is version('7.0.0', '>=') %}{{ es_package_url }}-{{ es_version }}-x86_64.rpm{% else %}{{ es_package_url }}-{{ es_version }}.rpm{% endif %}"
|
||||
|
||||
- name: RedHat - Install Elasticsearch from url
|
||||
become: yes
|
||||
yum: name={% if es_custom_package_url is defined %}{{ es_custom_package_url }}{% else %}{{ es_package_url }}-{{ es_version }}.noarch.rpm{% endif %} state=present
|
||||
yum:
|
||||
name: '{% if es_custom_package_url is defined %}{{ es_custom_package_url }}{% else %}{{ es_rpm_url }}{% endif %}'
|
||||
state: present
|
||||
when: not es_use_repository
|
||||
register: elasticsearch_install_from_package
|
||||
notify: restart elasticsearch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue