mysql-formula/mysql/files/my.cnf
root c55c2a4c46 Add support table param for mysql.user state (by default table is *)
Add support of changing/adding any attribute in my.cnf. NB!!! It breaks backward compatibility for mysql.server state.
Delete mysql_size param support (now you can customiza all my.cnf parameters in pillar)
Add script import_users.py that create user pillar for existent server
Add support root@localhost mysql user without password (root_password = False)
Add support of grant_option
2014-09-29 00:08:11 +09:00

31 lines
1.3 KiB
INI

# DO NOT CHANGE THIS FILE!
# This config is generated by SALTSTACK
# and all change will be overrided on next salt call
{% from "mysql/defaults.yaml" import rawmap with context %}
{% from "mysql/supported_params.yaml" import supported_params with context %}
{%- set datamap = salt['grains.filter_by'](rawmap, grain='os', merge=salt['pillar.get']('mysql:server:lookup')) %}
{%- for section_name, supparams in supported_params.items() %}
[{{ section_name }}]
{%- for allowedparam in supparams|default([]) %}
{%- set indents = 40 - allowedparam|count %}
{%- set mparam = salt['pillar.get']('mysql:server:'+section_name+':'+allowedparam, false) %}
{%- if mparam %}
{%- if mparam == "noarg_present" %}
{{ allowedparam }}
{%- else %}
{{ allowedparam }}{{ '='|indent(indents, true) }} {{ mparam }}
{%- endif %}
{%- else %}
{%- if datamap.config.sections[section_name] is defined %}
{%- if datamap.config.sections[section_name][allowedparam] is defined %}
{%- if datamap.config.sections[section_name][allowedparam] == "noarg_present" %}
{{ allowedparam }}
{%- else %}
{{ allowedparam }}{{ '='|indent(indents, true) }} {{ datamap.config.sections[section_name][allowedparam] }}
{%- endif %}
{%- endif %}
{%- endif %}
{%- endif %}
{%- endfor %}
{% endfor %}
{{ datamap.config.append }}