try to use the "apply syntax" because hostgroup_name is an unknown directive (it doesn't work)