Skip to content

Variable in dict keys #2057

Answered by kwist-sgr
SuicidalToaster asked this question in Q&A
Discussion options

You must be logged in to vote

and if so?

upstream main-srv-{{ env }} {
    least_conn;

{% for host in groups[my_var] %}
    server {{ hostvars[host]['ansible_host'] }}:80;
{% endfor %}
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SuicidalToaster
Comment options

Answer selected by SuicidalToaster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants