mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-18 01:24:20 +01:00
Changed behavior of installing with ninor version supplied or not supplied to work with one task instead of two
This commit is contained in:
@@ -4,13 +4,8 @@
|
||||
when: ( ansible_distribution == "CentOS" ) and ( ansible_distribution_major_version == "6" )
|
||||
- name: RedHat - add Elasticsearch repo
|
||||
template: src=elasticsearch.repo dest=/etc/yum.repos.d/elasticsearch-{{ es_major_version }}.repo
|
||||
- name: RedHat - Install Elasticsearch with minor version supplied
|
||||
when: es_version != ""
|
||||
yum: name=elasticsearch-{{ es_version }} state=present update_cache=yes
|
||||
register: elasticsearch_install
|
||||
- name: RedHat - Install Elasticsearch without minor version supplied
|
||||
when: es_version == ""
|
||||
yum: name=elasticsearch state=present update_cache=yes
|
||||
- name: RedHat - Install Elasticsearch
|
||||
yum: name=elasticsearch{% if es_version is defined and es_version != "" %}-{{ es_version }}{% endif %} state=present update_cache=yes
|
||||
register: elasticsearch_install
|
||||
|
||||
- name: RedHat - configure memory
|
||||
|
||||
Reference in New Issue
Block a user