ansible-role-elasticsearch/tasks/elasticsearch-scripts.yml
Jonathan Strootman d36f1dd497 Added with_fileglob loop to script and template
This allows the user to set the `es_template_fileglob` or
`es_scripts_fileglob` variables in order to specify a directory of index
templates or scripts.

Issue #57
2016-03-09 16:55:39 -07:00

14 lines
520 B
YAML

---
- set_fact: es_script_dir={{ es_conf_dir }}/{{es_instance_name}}
- set_fact: es_script_dir={{es_config['path.scripts']}}
when: es_config['path.scripts'] is defined
- name: Create script dir
file: state=directory path={{ es_script_dir }} owner={{ es_user }} group={{ es_group }}
when: es_config['path.scripts'] is defined
- name: Copy scripts to elasticsearch
copy: src={{ item }} dest={{ es_script_dir }} owner={{ es_user }} group={{ es_group }}
with_fileglob: es_scripts_fileglob | default("scripts")