From 11bf8d2d54e1826086b9dd36c0dc4764aaf35d9e Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Wed, 11 Dec 2019 13:40:15 +0100 Subject: [PATCH] set templates task to run only if es_templates is true --- README.md | 2 +- defaults/main.yml | 2 +- tasks/main.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1defec8..3542838 100644 --- a/README.md +++ b/README.md @@ -461,7 +461,7 @@ Both ```es_user_id``` and ```es_group_id``` must be set for the user and group i * ```es_restart_on_change``` - defaults to true. If false, changes will not result in Elasticsearch being restarted. * ```es_plugins_reinstall``` - defaults to false. If true, all currently installed plugins will be removed from a node. Listed plugins will then be re-installed. -This role ships with sample templates located in the [files/templates/](files/templates) directory. `es_templates_fileglob` variable (defaults to `/files/templates/`) is used with the Ansible [with_fileglob](http://docs.ansible.com/ansible/playbooks_loops.html#id4) loop. When setting the globs, be sure to use an absolute path. +This role ships with sample templates located in the [test/integration/files/templates-7.x](test/integration/files/templates-7.x) directory. `es_templates_fileglob` variable is used with the Ansible [with_fileglob](http://docs.ansible.com/ansible/playbooks_loops.html#id4) loop. When setting the globs, be sure to use an absolute path. ### Proxy diff --git a/defaults/main.yml b/defaults/main.yml index 8647d2f..c57152a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,7 +6,7 @@ es_package_name: "elasticsearch" es_version_lock: false es_use_repository: true es_add_repository: true -es_templates_fileglob: "files/templates-{{ es_major_version }}/*.json" +es_templates_fileglob: "" es_repo_base: "https://artifacts.elastic.co" es_apt_key: "{{ es_repo_base }}/GPG-KEY-elasticsearch" es_apt_url: "deb {{ es_repo_base }}/packages/{{ es_repo_name }}/apt stable main" diff --git a/tasks/main.yml b/tasks/main.yml index 8cd4bf5..f32e0b8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -103,6 +103,6 @@ #We also do after the native realm to ensure any changes are applied here first and its denf up. - name: include elasticsearch-template.yml include: elasticsearch-template.yml - when: es_templates + when: es_templates | bool tags: - templates