{% if list_type == 'whitelist' %} {% if policed_groups is not None and len(policed_groups) > 0 %} AllowGroups {{ ' '.join(policed_groups) }} {% endif %} {% if policed_users is not None and len(policed_users) > 0 %} AllowUsers {{ ' '.join(policed_users) }} {% endif %} {% else %} {% if policed_groups is not None and len(policed_groups) > 0 %} DenyGroups {{ ' '.join(policed_groups) }} {% endif %} {% if policed_users is not None and len(policed_users) > 0 %} DenyGroups {{ ' '.join(policed_users) }} {% endif %} {% endif %}