Re: [ansible-project] [Ansible 2.5] Question about with_dict and hash_behaviour = merge

2018-02-26 Thread Brian Coca
That is one possibility, another:

loop: '{{champions|dict2items}}'


-- 
--
Brian Coca

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7d5jHBXkF-8HMy4icHKKRGmmfPvrJiKwjhV8n-HXX9e0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] [Ansible 2.5] Question about with_dict and hash_behaviour = merge

2018-02-26 Thread David Reagan

So, replace:

with_dict: "{{ champions }}"

with:

loop: "{{ lookup('dict', champions }}"

?

On 02/26/2018 12:35 PM, Brian Coca wrote:

With with_dict <- you are already using a lookup, `lookup("dict",
`, all with_ constructs ARE lookups.

Using a lookup or not, the hash_behaviour stays unchanged. Also there
is a filter dict2items that you might want to use instead of the
lookup.




--
- David Reagan

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/29175daa-8afd-d6ac-3748-7481ec020877%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] [Ansible 2.5] Question about with_dict and hash_behaviour = merge

2018-02-26 Thread Brian Coca
With with_dict <- you are already using a lookup, `lookup("dict",
`, all with_ constructs ARE lookups.

Using a lookup or not, the hash_behaviour stays unchanged. Also there
is a filter dict2items that you might want to use instead of the
lookup.


-- 
--
Brian Coca

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7eLwurxJMHsxEmr-w%3DiNwz%3DJimgPFihiWXxjh%3De3zYWEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.