Don't try adding insecure registries if not defined

This ansible var may be undefined and let's check
for that.

Change-Id: I506cffb1732bcdb09a53ad0445e807fc3ae24a03
Closes-Bug: #1929927
This commit is contained in:
ramishra 2021-06-01 08:00:05 +05:30
parent 150155ff9f
commit 542b7e70a7
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@ insecure = {{ mirror.insecure | default(False) | bool | ternary('true', 'false')
{% endif %}
{% endfor %}
{% if tripleo_podman_insecure_registries is defined %}
# insecure registry list
{% for reg in tripleo_podman_insecure_registries %}
[[registry]]
@ -25,3 +26,4 @@ prefix = "{{ reg }}"
insecure = true
location = "{{ reg }}"
{% endfor %}
{% endif %}