From c2ca424dac9723a69f315b953ab10d643c087dff Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger <heinz@m2mobi.com> Date: Wed, 14 Nov 2018 10:33:31 +0100 Subject: [PATCH] Use separate global config section when using a config directory. --- mysql/files/my-include.cnf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql/files/my-include.cnf b/mysql/files/my-include.cnf index 35eff10..2ea1102 100644 --- a/mysql/files/my-include.cnf +++ b/mysql/files/my-include.cnf @@ -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}) -%} -- GitLab