# DO NOT CHANGE THIS FILE! # This config is generated by SALTSTACK # and all change will be overrided on next salt call {#- ===== FETCH DATA ===== -#} {% from tpldir ~ "/map.jinja" import mysql with context %} {%- from tpldir ~ "/supported_sections.yaml" import supported_sections with context -%} {#- ===== COMBINE DATA ===== -#} {%- set goodParamList = mysql.library_config.sections -%} {%- for section_name in supported_sections -%} {%- set sectdict = mysql.library_config.sections[section_name] | default({}) -%} {%- for mparam, mvalue in salt['pillar.get']('mysql:library:'+section_name, {}).items() -%} {%- set mparamUnderscore = mparam | replace('-','_') -%} {%- do sectdict.update({mparamUnderscore:mvalue}) -%} {%- endfor -%} {%- do goodParamList.update({section_name:sectdict}) -%} {%- endfor -%} {#- ===== PRINT DATA ===== -#} {%- for sname,sdata in goodParamList.items() -%} {%- if sdata %} [{{ sname }}] {%- for mparam, mvalue in sdata.items()|default([])|sort -%} {%- if mvalue is none %}{% continue %}{% endif -%} {%- set indents = 40 - mparam|count %} {% if mvalue == "noarg_present" -%} {{ mparam }} {%- else -%} {{ mparam }}{{ '='|indent(indents, true) }} {{ mvalue }} {%- endif -%} {%- endfor -%} {%- endif -%} {%- endfor %} {{ mysql.library_config.append | default('') }}