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-projec

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 sta

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 th

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

2018-02-26 Thread David Reagan
According to this blog post: https://www.ansible.com/blog/loop-plays-past-present-future with_dict is going away. All my roles rely heavily on `with_dict` and `hash_behaviour = merge` merging to avoid configuring the same values over and over again. If I need to add or override a value, I just