diff --git a/tasks/elasticsearch-scripts.yml b/tasks/elasticsearch-scripts.yml index 546ed19..6d7d297 100644 --- a/tasks/elasticsearch-scripts.yml +++ b/tasks/elasticsearch-scripts.yml @@ -10,4 +10,5 @@ when: es_config['path.scripts'] is defined - name: Copy scripts to elasticsearch - copy: src=scripts dest={{ es_script_dir }} owner={{ es_user }} group={{ es_group }} \ No newline at end of file + copy: src={{ item }} dest={{ es_script_dir }} owner={{ es_user }} group={{ es_group }} + with_fileglob: es_scripts_fileglob | default("scripts") diff --git a/tasks/elasticsearch-templates.yml b/tasks/elasticsearch-templates.yml index 1bcfd71..ba46fd8 100644 --- a/tasks/elasticsearch-templates.yml +++ b/tasks/elasticsearch-templates.yml @@ -1,7 +1,8 @@ --- - name: Copy templates to elasticsearch - copy: src=templates dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }} + copy: src={{ item }} dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }} + with_fileglob: es_templates_fileglob | default("templates") - set_fact: http_port=9200 @@ -17,4 +18,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 \ No newline at end of file + with_items: resultstemplate.stdout_lines