controller_projects.yml.j2 template
Check all values given in the template, this works in my setup (I use 'master' as the main branch).
---
{% set curr_env=curr_file.split(',')[0] %}
{% if code_environment_vars[curr_env]['projects'] | length > 0 %}
controller_projects_{{ curr_env }}:
{% for item in code_environment_vars[curr_env]['projects'] %}
- name: {{ item.name }}
description: {{ item.description }}
organization: {{ organization_long_name | upper }}
scm_type: git
{% if item.scm_url is defined %}
scm_url: {{ item.scm_url }}
{% endif %}
scm_credential: {{ organization_short_name | upper }}_gitlab
scm_branch: master
scm_clean: false
scm_delete_on_update: false
scm_update_on_launch: true
scm_update_cache_timeout: 0
allow_override: false
timeout: 0
{% endfor %}
{% else %}
controller_projects_{{ curr_env }}: []
{% endif %}
...