Skip to content
Snippets Groups Projects
Select Git revision
  • 060b43f3036bbdfd1c0910fe91ff280221ef116c
  • master default
  • v0.52.5
  • v0.52.4
  • v0.52.3
  • v0.52.2
  • v0.52.1
  • v0.52.0
  • v0.51.0
  • v0.50.0
  • v0.49.0
11 results

packages_spec.rb

Blame
  • server.cnf 1.42 KiB
    # 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 ~ "/defaults.yaml" import rawmap with context -%}
    {%- from tpldir ~ "/supported_sections.yaml" import supported_sections with context -%}
    {%- set datamap = salt['grains.filter_by'](rawmap, grain='os', merge=salt['pillar.get']('mysql:server:lookup')) -%}
    {#-
    ===== COMBINE DATA =====
    -#}
    {%- set goodParamList = datamap.server_config.sections -%}
    {%- for section_name in supported_sections -%}
    	{%- set sectdict = datamap.server_config.sections[section_name] | default({}) -%}
    	{%- for mparam, mvalue in salt['pillar.get']('mysql:server:'+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 -%}
    {%- set indents = 40 - mparam|count %}
    {% if mvalue == "noarg_present" -%}
    {{ mparam }}
    {% elif mvalue == "SETONPLEASE"  %}
    {{ mparam }}{{ '='|indent(indents, true) }} ON
    {%- else -%}
    {{ mparam }}{{ '='|indent(indents, true) }} {{ mvalue }}
    {%- endif -%}
    {%- endfor -%}
    {%- endif -%}
    {%- endfor %}
    
    {{ datamap.server_config.append | default('') }}