Created
November 8, 2018 16:41
-
-
Save muresan/da7c24302931a83dfb39dd2e1916ec2f to your computer and use it in GitHub Desktop.
jinja2 walk hash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vars: | |
es_nodes: | |
elastic1: | |
es_port: 9200 | |
elastic2: | |
es_port: 9201 | |
elastic3: | |
es_port: 9202 | |
elastic4: | |
es_port: 9203 | |
elastic5: | |
es_port: 9204 | |
hosts => [{% for k,v in es_nodes.items() %}"http://{{ k }}:{{ v.es_port }}"{% if not loop.last %},{% endif %}{% endfor %}] | |
hosts => ["http://elastic3:9202","http://elastic2:9201","http://elastic1:9200","http://elastic5:9204","http://elastic4:9203"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment