I have the following defined in vars or defaults:
fusemq_authentication:
- { 'username':'admin', 'password’:'blah', 'groups':'admin' }
- { 'username':'LOGSTASH', 'password’:'bing', 'groups':'LOGSTASH' }
I want to know the password for LOGSTASH in a template. Today I loop until
I find it. Is there a simpler way?
{% for value in fusemq_authentication %}
{% if value.username=="LOGSTASH" %}
fuseMQ_password={{ value.password }}
{% endif %}
{% endfor %}
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/72470009-3f65-4b70-85f1-e31c83b468bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.