I wrote some code to deep merge lists and submitted it as a feature request but it’s not been accepted. I thought I’d leave a record of it here if someone else asks for the same feature:-
https://github.com/ansible/ansible/pull/25438
The feature is optional so wouldn’t have effected the running of Ansible for any users who didn’t want it. Switched on via:-
list_behaviour = merge
After I wrote it I also discovered someone else had done exactly the same thing but as an action plugin:-
https://github.com/sailthru/ansible-oss/tree/master/tools/echelon
The extension I’ve added is to add a set of tests and implement it in core. I do think it needs peer review though especially with regards to how deep the list merging goes, echelon does recursive list merging and I just do it once. If I need to use the feature I will likely have to go the echelon route but a shame given the interest on irc and elsewhere.