mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 17:50:27 +00:00
Merge pull request #196 from alxwr/master
Prevent None values in config files
This commit is contained in:
commit
2e9b8f9d4c
7 changed files with 10 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
[{{ 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 }}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
[{{ 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 }}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
[{{ 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 }}
|
||||
|
|
|
@ -26,12 +26,14 @@
|
|||
|
||||
[{{ 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 -%}
|
||||
{%- if mvalue is iterable and mvalue is not string -%}
|
||||
{%- for item in mvalue -%}
|
||||
{%- if item is none %}{% continue %}{% endif -%}
|
||||
{{ mparam }}{{ '='|indent(indents, true) }} {{ item }}
|
||||
{% endfor -%}
|
||||
{%- else -%}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
[{{ 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 }}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
[{{ 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 }}
|
||||
|
|
|
@ -84,7 +84,7 @@ mysql_install_datadir:
|
|||
{% else %}
|
||||
- name: mysql_install_db --user=mysql --basedir=/usr --datadir={{ mysql_datadir }}
|
||||
{% endif %}
|
||||
- user: root
|
||||
- runas: root
|
||||
- creates: {{ mysql_datadir }}/mysql/user.frm
|
||||
- env:
|
||||
- TMPDIR: '/tmp'
|
||||
|
@ -110,7 +110,7 @@ mysqld-packages:
|
|||
mysql_initialize:
|
||||
cmd.run:
|
||||
- name: mysqld --initialize-insecure --user=mysql --basedir=/usr --datadir={{ mysql_datadir }}
|
||||
- user: root
|
||||
- runas: root
|
||||
- creates: {{ mysql_datadir}}/mysql/
|
||||
- require:
|
||||
- pkg: {{ mysql.serverpkg }}
|
||||
|
@ -132,7 +132,7 @@ mysql_initialize:
|
|||
mysql_initialize:
|
||||
cmd.run:
|
||||
- name: emerge --config {{ mysql.serverpkg }}
|
||||
- user: root
|
||||
- runas: root
|
||||
- creates: {{ mysql_datadir}}/mysql/
|
||||
- require:
|
||||
- pkg: {{ mysql.serverpkg }}
|
||||
|
|
Loading…
Add table
Reference in a new issue