Hey,
I've been pulling my hair out over what seems like a relatively simple task
for hours now.
I've working on playbook for an Elasticsearch deployment. One requirement
for this is a config file item that is effectively just a comma separated
list of hostnames or IP's of nodes.
e.g.
discovery.zen.ping.unicast.hosts: ["hostname1", "hostname2", "hostname3"]
Functionally at this point I would want to generate an output here that
would effective append the bellow registered variable:
node_masters: [" "{{ansible_hostname (FIRST GROUP MEMBER) }}",
"{{ansible_hostname (SECOND GROUP MEMBER) }}", "{{ansible_hostname (THIRD
GROUP MEMBER) }}"
The current j2 template for the config file uses a to_nice_yaml filter for
the es_config variable
{% if es_config %}
{{ es_config | to_nice_yaml }}
{% endif %}
I just want to get to a point where i can basically just feed in my
theorical node_masters var to the es_config part of the play like bellow:
es_config:
network.host: "{{ ansible_fqdn }}"
cluster.name: "lab-cluster"
*discovery.zen.ping.unicast.hosts: {{ node_masters }}*
discovery.zen.minimum_master_nodes: 1
http.port: 9200
node.data: true
node.master: true
bootstrap.memory_lock: false
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b0333864-543a-46e9-b0ba-ec95581b7624%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.