ansible-role-gitlab/templates/gitlab.rb.j2

26 lines
647 B
Django/Jinja

# {{ ansible_managed }}
external_url '{{ gitlab_url }}'
{% if gitlab_pages_url is defined %}
pages_external_url '{{ gitlab_pages_url }}'
{% endif %}
{% if gitlab_data_dir is defined %}
git_data_dirs({
"default" => {
"path" => "{{ gitlab_data_dir }}"
}
})
{% endif %}
{% for module, options in gitlab_config.items() %}
{% for option, value in options.items() %}
{{ module }}['{{ option }}'] = {% if value is sameas true %}true
{% elif value is sameas false %}false
{% elif value is string %}'{{ value }}'
{% elif value is number %}{{ value }}
{% else %}YAML.load <<-EOS
{{ value|to_nice_yaml }}
EOS
{% endif %}
{% endfor %}
{% endfor %}