File tree 5 files changed +23
-4
lines changed
5 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
es_major_version : " 1.7"
3
- es_version : " 1.7.0 "
3
+ es_version : " 1.7.1 "
4
4
es_version_lock : false
5
5
es_use_repository : true
6
6
es_start_service : true
7
7
es_plugins_reinstall : false
8
8
es_scripts : false
9
+ es_templates : false
9
10
es_user : elasticsearch
10
11
es_group : elasticsearch
Original file line number Diff line number Diff line change 2
2
- name : RedHat - install yum-version-lock
3
3
yum : name=yum-plugin-versionlock state=present update_cache=yes
4
4
- name : RedHat - lock elasticsearch version
5
- command : yum versionlock add elasticsearch
5
+ shell : yum versionlock delete 0:elasticsearch* ; yum versionlock add elasticsearch{% if es_version is defined and es_version != "" %}-{{ es_version }}{% endif %}
6
6
Original file line number Diff line number Diff line change 7
7
template : src=elasticsearch.repo dest=/etc/yum.repos.d/elasticsearch-{{ es_major_version }}.repo
8
8
when : es_use_repository
9
9
10
+ - name : RedHat - include versionlock
11
+ include : elasticsearch-RedHat-version-lock.yml
12
+ when : es_version_lock
13
+
10
14
- name : RedHat - Install Elasticsearch
11
15
yum : name=elasticsearch{% if es_version is defined and es_version != "" %}-{{ es_version }}{% endif %} state=present update_cache=yes
12
16
when : es_use_repository
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Copy templates to elasticsearch
3
+ copy : src=templates dest=/etc/elasticsearch/
4
+
5
+ - name : Wait for elasticsearch to startup
6
+ wait_for : port=9200 delay=10
7
+
8
+ - name : Get template files
9
+ shell : find . -maxdepth 1 -type f | sed "s#\./##" | sed "s/.json//" chdir=/etc/elasticsearch/templates
10
+ register : resultstemplate
11
+
12
+ - name : Install template(s)
13
+ command : ' curl -sL -XPUT http://localhost:9200/_template/{{item}} -d @/etc/elasticsearch/templates/{{item}}.json'
14
+ with_items : resultstemplate.stdout_lines
Original file line number Diff line number Diff line change 3
3
- include : elasticsearch.yml
4
4
- include : elasticsearch-plugins.yml
5
5
when : es_plugins is defined
6
- - include : elasticsearch-version-lock.yml
7
- when : es_version_lock
8
6
- include : elasticsearch-scripts.yml
9
7
when : es_scripts
8
+ - include : elasticsearch-templates.yml
9
+ when : es_templates
10
10
You can’t perform that action at this time.
0 commit comments