stdout_callback=debug
#Default verbosity level, for logging all module outputs.
verbosity=1
+jinja2_extensions = jinja2.ext.do
[inventory]
#Fail when inventory parsing fails.
external_subnet_cidr: ""
#Address of cicd docker registry.
cicd_docker_registry: ""
+#Address of custom docker registry mirror
+docker_registry_mirror: ""
#Number of nodes to deploy.
num_nodes: "3"
#Stack name to deploy on heat.
+{% set insecure_registries = [] %}
+{% for registry in [cicd_docker_registry, docker_registry_mirror] %}
+{% if registry|length > 0 %}
+{% do insecure_registries.append(registry) %}
+{% endif %}
+{% endfor %}
{
-"insecure-registries": ["{{ cicd_docker_registry }}"]
+"insecure-registries": [
+{%- for registry in insecure_registries %}
+"{{ registry }}"{% if not loop.last %}, {% else %}]{% endif %}
+{% endfor %}
+{% if docker_registry_mirror|length > 0 %}
+,
+"registry-mirrors": ["http://{{ docker_registry_mirror }}"]
}
+{% else %}
+
+}
+{% endif %}