In trying to wrangle my inventory to be more dynamic, I’ve come to find group_by and add_hosts. group_by seems to work well, but I’m having trouble understanding why add_host seems to only add a single host to a new group: it’s always the first host in the list.
When I use my recently created group names (from a group_by) in a new playbook within the same run, my test remote echo works as expected, but add_hosts is only called against a single host (always the first host in my inventory).
playbook and output here: https://gist.github.com/davidbirdsong/6668127