obtaining hostnames and groups

Use "{{ group_names }}". There can be more than one group, so you'll
likely need to join them with something like "{{ group_names | join(',
') }}"

--Steve