I’d like to say hello to all of you Ansible guys.
I’ve seen a lot of discussion about hash_behaviour=merge being deprecated, than about holding back with deprecation…
I’d like to know, anybody out there is still using hash_behaviour=merge ?
Is it really bad?
Is it considered as bad praxis, that should be avoided? Is it gonna be deprecated in the future maybe? (because that would mean rewriting of all Ansible code significantly).
My goal is to have var (dictionary) ideally of the same common name defined partially in role defaults and partially overridden from group_vars and for the tasks in the role to function properly I need to merge these dictionaries together from defaults and group_vars. I believe that hash_behaviour=merge would do and will probably be the easiest possible way to achieve this, but… am I wrong?
My approach is wrong? Is it something that should never be done? Should there be only vars of distinguished names for defaults and group_vars and they should be combined into “merged” dictionary inside the role, only?
Thank you in advance for your ideas, opinion, I’m really looking for the best praxis recommendation, something that will stay, will be simple and maintainable and will not require change in near future.
Have great day everyone…