I can see how this feature would work by overriding nested items by merging.
But now I think of it again, I had trouble if I wanted to remove/unset
a nested item later?
IMHO it's this sort of corner cases that make things difficult.

On Sun, 27 Sep 2020 at 22:00, Dan Linder <d...@linder.org> wrote:
>
> I'll second ND that the hash_behavior option of "merge" is more usable in my 
> situation - I have hashes of information that get built up in the playbook 
> (one piece sets defaults for a location (i.e. "North America" vs "Europe" vs 
> "Asia"), then a later part sets defaults for different datacenters, and later 
> a specific subnet might over-ride other settings.  This way I could have all 
> my European systems default to using settings that applied to the entire 
> zone, but my servers in different datacenters would get settings specific 
> there (i.e. a Git or NTP server, etc), and individual subnets might have 
> different NTP servers but still use the datacenters' Git server.
>
> Merging hashes was a big win for this project.  Sadly, we don't have a 
> "single source of truth", so we had to use multiple Ansible variable files to 
> build up our "truth" and merging them with each other.  Our inventories were 
> not the source of truth with all the information needed.  Without an external 
> CMDB that could take into account the location, datacenter, and subnet (to 
> name a few constraints), getting the data consistent would have been 
> impossible with Ansible.
>
> I'm not a programmer to the level that I can determine a better way to 
> address this in Ansible, but I'm hoping someone will work through a way to 
> merge them together and the hash merge behavior can be exposed again.
>
> On Sunday, September 27, 2020 at 9:56:00 AM UTC-5 dick....@geant.org wrote:
>>
>>
>>
>> On Sun, 27 Sep 2020 at 13:44, nd <ndno...@gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> is there any documentation on why this was deprecated?
>>
>>
>> According to the docs:
>>
>> This feature is fragile and not portable, leading to continual confusion and 
>> misuse
>>
>>
>>
>>
>>
>> --
>> Sent from a mobile device - please excuse the brevity, spelling and 
>> punctuation.
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/b618283e-ef76-44c6-be23-d2e4d7f346a8n%40googlegroups.com.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwNw-277QrfM5vugZ0C%2BTX4bL_VqT%3DpZzSmWVeLzQAY3SQ%40mail.gmail.com.

Reply via email to