Enable ConfigDebug for undercloud deployments

If undercloud_debug is true, we enable ConfigDebug so CI jobs can
provide more debug when things go wrong with config steps.

Change-Id: I4778b24866078c451997ffca3b9b80671f912b9d
This commit is contained in:
Emilien Macchi 2020-02-27 10:18:26 -05:00
parent 6179852a9d
commit 7bef443b73
2 changed files with 16 additions and 2 deletions
roles
undercloud-deploy/templates
undercloud-minion-deploy/templates

@ -4,10 +4,17 @@ valid YAML. The default to_nice_yaml filter doesn't quote strings,
which can cause unexpected implicit type conversion when the which can cause unexpected implicit type conversion when the
resulting YAML is consumed, whereas with JSON all strings are quoted. resulting YAML is consumed, whereas with JSON all strings are quoted.
#} #}
{% if undercloud_undercloud_debug | default(true) %}
{% set config_debug = {'parameter_defaults': {'ConfigDebug': true}} %}
{% else %}
{% set config_debug = {} %}
{% endif %}
{% if undercloud_resource_registry_args %} {% if undercloud_resource_registry_args %}
{% set undercloud_resource_registry = {'resource_registry': undercloud_resource_registry_args} %} {% set undercloud_resource_registry = {'resource_registry': undercloud_resource_registry_args} %}
{% else %} {% else %}
{% set undercloud_resource_registry = {} %} {% set undercloud_resource_registry = {} %}
{% endif %} {% endif %}
{% set undercloud_parameter_defaults = {'parameter_defaults': undercloud_network_environment_args} %} {% set undercloud_parameter_defaults = {'parameter_defaults': undercloud_network_environment_args} %}
{{ undercloud_parameter_defaults|combine(undercloud_resource_registry, recursive=True)|to_nice_json }} {{ undercloud_parameter_defaults|combine(undercloud_resource_registry, recursive=True)|combine(config_debug, recursive=True)|to_nice_json }}

@ -4,10 +4,17 @@ valid YAML. The default to_nice_yaml filter doesn't quote strings,
which can cause unexpected implicit type conversion when the which can cause unexpected implicit type conversion when the
resulting YAML is consumed, whereas with JSON all strings are quoted. resulting YAML is consumed, whereas with JSON all strings are quoted.
#} #}
{% if minion_minion_debug | default(true) %}
{% set config_debug = {'parameter_defaults': {'ConfigDebug': true}} %}
{% else %}
{% set config_debug = {} %}
{% endif %}
{% if minion_resource_registry_args %} {% if minion_resource_registry_args %}
{% set minion_resource_registry = {'resource_registry': minion_resource_registry_args} %} {% set minion_resource_registry = {'resource_registry': minion_resource_registry_args} %}
{% else %} {% else %}
{% set minion_resource_registry = {} %} {% set minion_resource_registry = {} %}
{% endif %} {% endif %}
{% set minion_parameter_defaults = {'parameter_defaults': minion_network_environment_args} %} {% set minion_parameter_defaults = {'parameter_defaults': minion_network_environment_args} %}
{{ minion_parameter_defaults|combine(minion_resource_registry, recursive=True)|to_nice_json }} {{ minion_parameter_defaults|combine(minion_resource_registry, recursive=True)|combine(config_debug, recursive=True)|to_nice_json }}