Merge pull request #187 from mkotsbak/fix_relative_references_in_templates

Use tpldir for template files too
This commit is contained in:
N 2018-06-24 14:27:58 +01:00 committed by GitHub
commit 84f1aa43a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 12 deletions

View file

@ -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

View file

@ -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 =====

View file

@ -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 =====

View file

@ -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 =====

View file

@ -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 =====

View file

@ -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 =====

View file

@ -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 =====