From 717dd74a9f6c251a706c68ae6da908c3a649315c Mon Sep 17 00:00:00 2001 From: Artem Alexandrov Date: Fri, 25 Mar 2016 11:20:23 +0300 Subject: [PATCH 1/3] Removed bare variables Issue #86 --- tasks/elasticsearch-plugins.yml | 6 +++--- tasks/elasticsearch-templates.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/elasticsearch-plugins.yml b/tasks/elasticsearch-plugins.yml index caa7316bb4826..e74874f55f93b 100644 --- a/tasks/elasticsearch-plugins.yml +++ b/tasks/elasticsearch-plugins.yml @@ -21,7 +21,7 @@ - name: Remove elasticsearch plugins command: "{{es_home}}/bin/plugin remove {{item}} --silent" ignore_errors: yes - with_items: installed_plugins.stdout_lines + with_items: "{{ installed_plugins.stdout_lines }}" when: es_plugins_reinstall and installed_plugins.stdout_lines | length > 0 and not 'No plugin detected' in installed_plugins.stdout_lines[0] notify: restart elasticsearch environment: @@ -42,7 +42,7 @@ register: plugin_installed failed_when: "'Failed to install' in plugin_installed.stderr" changed_when: plugin_installed.rc == 0 - with_items: es_plugins + with_items: "{{ es_plugins }}" when: es_plugins is defined and not es_plugins is none notify: restart elasticsearch environment: @@ -51,4 +51,4 @@ #Set permissions on plugins directory - name: Set Plugin Directory Permissions - file: state=directory path={{ plugin_dir }} owner={{ es_user }} group={{ es_group }} recurse=yes \ No newline at end of file + file: state=directory path={{ plugin_dir }} owner={{ es_user }} group={{ es_group }} recurse=yes diff --git a/tasks/elasticsearch-templates.yml b/tasks/elasticsearch-templates.yml index 0fe3a0f507f08..42bad7720aa8b 100644 --- a/tasks/elasticsearch-templates.yml +++ b/tasks/elasticsearch-templates.yml @@ -8,7 +8,7 @@ - name: Copy templates to elasticsearch copy: src={{ item }} dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }} - with_fileglob: es_templates_fileglob + with_fileglob: "{{ es_templates_fileglob }}" - set_fact: http_port=9200 @@ -24,4 +24,4 @@ - name: Install template(s) command: "curl -sL -XPUT http://localhost:{{http_port}}/_template/{{item}} -d @/etc/elasticsearch/templates/{{item}}.json" - with_items: resultstemplate.stdout_lines + with_items: "{{ resultstemplate.stdout_lines }}" From 62c16c69c96a8bb1dfb9a6329a1af37ee85da02a Mon Sep 17 00:00:00 2001 From: Artem Alexandrov Date: Thu, 31 Mar 2016 10:51:21 +0300 Subject: [PATCH 2/3] Fix for copying ES templates if es_templates_fileglob was specified --- tasks/elasticsearch-templates.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/elasticsearch-templates.yml b/tasks/elasticsearch-templates.yml index 42bad7720aa8b..a4179a6710225 100644 --- a/tasks/elasticsearch-templates.yml +++ b/tasks/elasticsearch-templates.yml @@ -7,7 +7,7 @@ when: es_templates_fileglob is not defined - name: Copy templates to elasticsearch - copy: src={{ item }} dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }} + copy: src={{ item }} dest=/etc/elasticsearch/templates owner={{ es_user }} group={{ es_group }} with_fileglob: "{{ es_templates_fileglob }}" - set_fact: http_port=9200 From c7e449f63fdfbb25b6120640c2ef895cea44ebbe Mon Sep 17 00:00:00 2001 From: Artem Alexandrov Date: Thu, 31 Mar 2016 10:52:39 +0300 Subject: [PATCH 3/3] Added *.pyc files to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0bb96d718ae52..dca2467969fa2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ .kitchen/ *.lock +*.pyc .vendor .bundle Converging TODO .idea/ -elasticsearch.iml \ No newline at end of file +elasticsearch.iml