jepper <[email protected]> napisał:
>
>
>I have the following defined in vars or defaults:
>
>fusemq_authentication:
>- { 'username':'admin', 'password’:'blah', 'groups':'admin'
>}
> - { 'username':'LOGSTASH', 'password’:'bing', 'groups':'LOGSTASH' }
This should be a dictionary
>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 %}
Yes, with fusemq_authentication as a dict it would be:
fuseMQ_password={{ fusemq_authentication. LOGSTASH.password }}
--
Wysłane za pomocą K-9 Mail.
--
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/2ddddd6e-a0d3-45fb-b587-05b0960a6823%40email.android.com.
For more options, visit https://groups.google.com/d/optout.