Using host groups in a playbook

Hi everybody,

I was wondering what is the most idiomatic way of doing the following:

try

{{ “:9999,”.join(groups[‘database’]) + ‘:9999’ }}