My ansible script will be running for multiple systems. But in elasticsearch.jinja2 how can i change the value of
node.name for different systems.
Jinja 2 Code::-
-------------------
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#
# Add custom attributes to the node:
#
# node.rack: r1
If i am running this jinja2 file, across all the systems the value of
node.name will be same. But i dont want this, i want to put some other values when it runs to other systems.
what modification i can do in Jinja2 file , can anyone help me ??
My ansible playbook looks like this::
---
## Task Related to Configuration of Elastic Search ::
- name: Copy Configuration file for Elastic Search
template:
src: elasticsearch.jinja2
dest: /etc/elasticsearch/elasticsearch.yml
mode: 0750
owner: root
group: elasticsearch