Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Local variable in .ERB file works during first run but won't update if list value is changed on consecutive runs

Hi all,

New here so forgive me if I'm asking something that has been asked. I looked around and could not find any information on it specifically.

I'm building out an elasticsearch test cluster. When I do the initial run, the elasticsearch.yml file is updated and the elasticsearch_servers variable joins the list fine, but if I add a server to that list, on consecutive runs, they are not added to the file.

I'm also using this list to generate firewall rules so it's used in multiple places.

Org is currently stuck on puppet 3 so no EPP for us :(

Below is the example ERB.

# List of elasticsearch servers.
$elasticsearch_servers = [
-%> my_cluster <%= @fqdn %> ["<%= $elasticsearch_servers.join('", "') %>"]
bootstrap.memory_lock: true
discovery.zen.minimum_master_nodes: 2 <%= @ipaddress_ens160 %>