# This file is managed via tripleo-ansible

unqualified-search-registries = {{ tripleo_podman_unqualified_search_registries | list | to_json }}

# registries configuration
{% for reg in tripleo_podman_registries %}
[[registry]]
prefix = "{{ reg.prefix }}"
location = "{{ reg.location | default(reg.prefix) }}"
insecure = {{ reg.insecure | default(False) | bool | ternary('true', 'false') }}
blocked = {{ reg.blocked | default(False) | bool | ternary('true', 'false') }}
{% if 'mirrors' in reg %}
{% for mirror in reg.mirrors %}
[[registry.mirror]]
location = "{{ mirror.location }}"
insecure = {{ mirror.insecure | default(False) | bool | ternary('true', 'false') }}
{% endfor %}
{% endif %}
{% endfor %}

# insecure registry list
{% for reg in tripleo_podman_insecure_registries %}
[[registry]]
prefix = "{{ reg }}"
insecure = true
location = "{{ reg }}"
{% endfor %}
