From 7a10252f8a876771101f71899ed3a0c17a8f0b86 Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Mon, 14 Sep 2015 16:16:58 +0200 Subject: [PATCH 1/5] Only update cache for java if it's older than an hour It got quite annoying... --- tests/roles/java/tasks/Debian.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/roles/java/tasks/Debian.yml b/tests/roles/java/tasks/Debian.yml index c835eea..78ef424 100644 --- a/tests/roles/java/tasks/Debian.yml +++ b/tests/roles/java/tasks/Debian.yml @@ -1,3 +1,3 @@ --- - name: Install Java - apt: name={{ java_package }} state=latest update_cache=yes + apt: name={{ java_package }} state=latest update_cache=yes cache_valid_time=3600 From 043c81826c47e26234dde874454cf722290723c5 Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Mon, 14 Sep 2015 16:17:26 +0200 Subject: [PATCH 2/5] Defined the plugin URLs This will allow manual installation, because it's broken for now... --- tests/group_vars/all.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/group_vars/all.yml b/tests/group_vars/all.yml index e571c65..b5d27eb 100644 --- a/tests/group_vars/all.yml +++ b/tests/group_vars/all.yml @@ -1,8 +1,13 @@ --- es_plugins: - name: elasticsearch/marvel/1.3.1 + url: http://download.elasticsearch.org/elasticsearch/marvel/marvel-1.3.1.zip + #http://search.maven.org/remotecontent?filepath=elasticsearch/marvel/1.3.1/marvel-1.3.1.zip + - name: lmenezes/elasticsearch-kopf/v1.5.4 + url: https://codeload.github.com/lmenezes/elasticsearch-kopf/zip/v1.5.4 plugin_file: kopf + - name: elasticsearch-jetty-1.2.1 url: https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-1.2.1.zip plugin_file: jetty-1.2.1/elasticsearch-jetty-1.2.1.jar From 64e0ebeffd68bb8a044c98c11d04aa25050a1ce0 Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Mon, 14 Sep 2015 16:19:33 +0200 Subject: [PATCH 3/5] updating the package index when the repository is new --- tasks/debian.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/debian.yml b/tasks/debian.yml index 0eb3d71..fc7d225 100644 --- a/tasks/debian.yml +++ b/tasks/debian.yml @@ -6,11 +6,16 @@ apt_repository: repo: 'deb http://packages.elasticsearch.org/elasticsearch/{{ es_release }}/debian stable main' state: present + register: add_elastic_repo - name: Copy /etc/default/elasticsearch template: src=elasticsearch dest=/etc/default/elasticsearch notify: Restart elasticsearch +- name: Refresh apt-cache to get elastic packages + apt: update_cache=true + when: add_elastic_repo|changed + - name: Install ElasticSearch - apt: name=elasticsearch={{ es_version }} state=present + apt: name=elasticsearch={{ es_version }} state=present update_cache=true cache_valid_time=1800 notify: Restart elasticsearch From 6c7fe02e2401095f0a995649b58079b9e0c25215 Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Mon, 14 Sep 2015 16:20:19 +0200 Subject: [PATCH 4/5] There is a bug in 1.6.0 with the service.pid file --- tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index ec52378..3b624a3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -5,6 +5,10 @@ - include: redhat.yml when: ansible_os_family == "RedHat" +- name: Ensure /var/run/elasticsearch/ exists + # It crashes otherwise... + file: path=/var/run/elasticsearch/ state=directory + - name: Copy /etc/elasticsearch/elasticsearch.yml template: src=elasticsearch.yml dest=/etc/elasticsearch/elasticsearch.yml notify: Restart elasticsearch From 39395cca03a3781bd66d0143c42aeee2ad7e67ad Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Mon, 14 Sep 2015 16:22:03 +0200 Subject: [PATCH 5/5] Using newer version of elastic search this fixes at least one bug with the service.pid file --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8495583..bdf4184 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,7 +1,7 @@ --- # Elasticsearch release and version to install es_release: "1.6" -es_minor_release: "0" +es_minor_release: "2" es_version: "{{ es_release }}.{{es_minor_release}}" # Wait for elasticsearch to be listening for connections before proceeding