You don't say what error you get?
In any case, you are trying to access hostvars for a group, which
isn't possible.
Instead, you need to access hostvars from a host.
So for a group, practically this is done by accessing the hostvars of
the first host of a group, like this:
hostvars[groups['groupname'][0]]['var_name']
Dick
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
ansible-proje...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e5ee9ca4-0099-4d2a-aa8a-659a69815ea3%40googlegroups.com.
--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT