Merging hash of lists in Ansible?

I’m trying to set /etc/hosts entries in a playbook. I’m managing three hashes of lists: common_stubs, env_stubs, and host_stubs. example of what I’m working with here common_stubs: “127.0.0.1”: – localhost env_stubs: “127.0.0.1”: – someservice.mydomain host_stubs: {} I want to combine these so I get combined_stubs: “127.0.0.1”: – localhost – someservice.mydomain This is what I’m currently…