Skip to content

Commit 1d3e2bb

Browse files
Ross Perkinsross-p
Ross Perkins
authored andcommitted
Added ability for SQL Schema sources to be templates
1 parent 5d74223 commit 1d3e2bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mysql/database.sls

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ include:
2424
file.managed:
2525
- name: /etc/mysql/{{ database }}.schema
2626
- source: {{ salt['pillar.get'](['mysql', 'schema', database, 'source']|join(':')) }}
27+
{%- set template_type = salt['pillar.get'](['mysql', 'schema', database, 'template']|join(':'), False) %}
28+
{%- if template_type %}
29+
- template: {{ template_type }}
30+
{% endif %}
2731
- user: {{ salt['pillar.get']('mysql:server:user', 'mysql') }}
2832
- makedirs: True
2933

0 commit comments

Comments
 (0)