I have a number of lists with names, that were created by appending ec2_public_dns_name
to seeds_
Like this: seeds_ec2-50-8-1-43.us-west-1.compute.amazonaws.com
I need in config for each host to access it's list and loop over it. I try to do it like this:
In playbook assign to new variable:
- name: Seeds provision
set_fact:
seeds: "seeds_{{ec2_public_dns_name}}"
And than in config use it:
{% for seed in seeds %}
{{seed.name ~ ","}}
{% endfor %}
But it seems like seeds
in config file is just text, I can't access list elements.
How can this be done?