mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-16 17:50:27 +00:00
Merge pull request #187 from mkotsbak/fix_relative_references_in_templates
Use tpldir for template files too
This commit is contained in:
commit
84f1aa43a0
7 changed files with 22 additions and 12 deletions
|
@ -20,6 +20,8 @@ mysql_server_config:
|
|||
- template: jinja
|
||||
- source: salt://{{ tpldir }}/files/server.cnf
|
||||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %}
|
||||
- context:
|
||||
tpldir: {{ tpldir }}
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
|
@ -33,6 +35,8 @@ mysql_galera_config:
|
|||
- template: jinja
|
||||
- source: salt://{{ tpldir }}/files/galera.cnf
|
||||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %}
|
||||
- context:
|
||||
tpldir: {{ tpldir }}
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
|
@ -46,6 +50,8 @@ mysql_library_config:
|
|||
- template: jinja
|
||||
- source: salt://{{ tpldir }}/files/client.cnf
|
||||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %}
|
||||
- context:
|
||||
tpldir: {{ tpldir }}
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
|
@ -59,6 +65,8 @@ mysql_clients_config:
|
|||
- template: jinja
|
||||
- source: salt://{{ tpldir }}/files/mysql-clients.cnf
|
||||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %}
|
||||
- context:
|
||||
tpldir: {{ tpldir }}
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
|
@ -76,6 +84,8 @@ mysql_config:
|
|||
{% else %}
|
||||
- source: salt://{{ tpldir }}/files/my.cnf
|
||||
{% endif %}
|
||||
- context:
|
||||
tpldir: {{ tpldir }}
|
||||
{% if os_family in ['Debian', 'Gentoo', 'RedHat'] %}
|
||||
- user: root
|
||||
- group: root
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{#-
|
||||
===== FETCH DATA =====
|
||||
-#}
|
||||
{%- from "mysql/defaults.yaml" import rawmap with context -%}
|
||||
{%- from "mysql/supported_sections.yaml" import supported_sections with context -%}
|
||||
{%- 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:library:lookup')) -%}
|
||||
{#-
|
||||
===== COMBINE DATA =====
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{#-
|
||||
===== FETCH DATA =====
|
||||
-#}
|
||||
{%- from "mysql/defaults.yaml" import rawmap with context -%}
|
||||
{%- from "mysql/supported_sections.yaml" import supported_sections with context -%}
|
||||
{%- 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:galera:lookup')) -%}
|
||||
{#-
|
||||
===== COMBINE DATA =====
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{#-
|
||||
===== FETCH DATA =====
|
||||
-#}
|
||||
{%- from "mysql/defaults.yaml" import rawmap with context -%}
|
||||
{%- from "mysql/supported_sections.yaml" import supported_sections with context -%}
|
||||
{%- 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:global:lookup')) -%}
|
||||
{#-
|
||||
===== COMBINE DATA =====
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{#-
|
||||
===== FETCH DATA =====
|
||||
-#}
|
||||
{%- from "mysql/defaults.yaml" import rawmap with context -%}
|
||||
{%- from "mysql/supported_sections.yaml" import supported_sections with context -%}
|
||||
{%- 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 =====
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{#-
|
||||
===== FETCH DATA =====
|
||||
-#}
|
||||
{%- from "mysql/defaults.yaml" import rawmap with context -%}
|
||||
{%- from "mysql/supported_sections.yaml" import supported_sections with context -%}
|
||||
{%- 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:clients:lookup')) -%}
|
||||
{#-
|
||||
===== COMBINE DATA =====
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
{#-
|
||||
===== FETCH DATA =====
|
||||
-#}
|
||||
{%- from "mysql/defaults.yaml" import rawmap with context -%}
|
||||
{%- from "mysql/supported_sections.yaml" import supported_sections with context -%}
|
||||
{%- 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 =====
|
||||
|
|
Loading…
Add table
Reference in a new issue