Use separate global config section when using a config directory.

This commit is contained in:
Heinz Wiesinger 2018-11-14 10:33:31 +01:00
parent edb8c82fe0
commit c2ca424dac

View file

@ -9,10 +9,10 @@
{#-
===== COMBINE DATA =====
-#}
{%- if "sections" in mysql.config -%}
{%- set goodParamList = mysql.config.sections -%}
{%- if "global_config" in mysql and "sections" in mysql.global_config -%}
{%- set goodParamList = mysql.global_config.sections -%}
{%- for section_name in supported_sections -%}
{%- set sectdict = mysql.config.sections[section_name] | default({}) -%}
{%- set sectdict = mysql.global_config.sections[section_name] | default({}) -%}
{%- for mparam, mvalue in salt['pillar.get']('mysql:global:'+section_name, {}).items() -%}
{%- set mparamUnderscore = mparam | replace('-','_') -%}
{%- do sectdict.update({mparamUnderscore:mvalue}) -%}