From 4473c01032155ad9b1c2cf6e4207577287ec80ea Mon Sep 17 00:00:00 2001 From: Jose M Date: Fri, 28 Jun 2019 10:11:36 +0200 Subject: [PATCH] Changed format of instances template. Name is required --- .../ansible-elasticsearch/templates/instances.yml.j2 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/elastic-stack/ansible-elasticsearch/templates/instances.yml.j2 b/roles/elastic-stack/ansible-elasticsearch/templates/instances.yml.j2 index ce4c287b..365da8c4 100644 --- a/roles/elastic-stack/ansible-elasticsearch/templates/instances.yml.j2 +++ b/roles/elastic-stack/ansible-elasticsearch/templates/instances.yml.j2 @@ -4,8 +4,11 @@ {% if node_generate_certs %} instances: -{% for item in elasticsearch_cluster_nodes %} - ip: {{ item.ip }} - - "{{ item.name }}" + +{% for node in instances %} +- name: "{{node.value.name}}" + ip: + - "{{ node.value.ip }}" {% endfor %} + {% endif %} \ No newline at end of file