{% if artifactory_licenses_dict %} {% for key in (artifactory_licenses_dict.keys() | select('match', '^ArtifactoryLicense\d$')) %} {% if loop.first %} {{ artifactory_licenses_dict[key] }} {% endif %} {% endfor %} {% endif %}