Greetings once again!
When working with the ansible-elasticsearch playbook (from https://github.com/elastic/ansible-elasticsearch), is it acceptable for all of the Ansible variables to be defined in the same file?
I’m using /root/.ansible/roles/elastic.elasticsearch/vars/main.yml as the single storehouse for the variables and parameters, and for some of them it seems to be working well. (Additional info: My template files from which the various configuration files are built include all of the standard templates that come with the playbook, and I have not deleted any of the playbook/github-supplied variables files.)
For example, I changed the default es_heap_size to 3g, and found that this value did indeed propagate to the destination Elasticsearch node’s jvm.options file Xms and Xmx lines.
However, if I try setting an es_config parameter (fair to call it a variable?), such as node.name, I’m not getting a similar propagation into the destination node’s elasticsearch.yml file. For instance,
es_config[‘node.name’]: babyyoda
doesn’t arrive at the destination, and node.name is set to the node’s IP address. I’ve tried variations such as putting the node name (babyyoda) in single or double quotes, to no effect. Do these parameters need to go into a different file? I’m not getting any squawks from Ansible about duplicate variable definitions being detected (the “duplicated dict key” warning), and I’m not seeing any errors related to the node.name parameter (using ansible-playbook -vvv).