I found Change variable in Ansible template based on group . However, how to extend the response in groups with children?
If I extend the group vars file from the link above to
[host0] host0.my-network.com [host1] host1.my-network.com [es-masters:children] host0 host1
How can I extend the above answer (see below) so that it works with the vars group file above? Simple FQDN replenishment in jinja2 instruction does not work.
{% if ansible_fqdn in groups['es-masters'] %} node_master=true {% else %} node_master=false {% endif %}
Chris f
source share