Merge "Manage minion.d using support metadata"
diff --git a/mysql/files/salt-minion.conf b/mysql/files/salt-minion.conf
deleted file mode 100644
index 6b7d028..0000000
--- a/mysql/files/salt-minion.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-{%- from "mysql/map.jinja" import server with context -%}
-mysql.unix_socket: /var/run/mysqld/mysqld.sock
-{%- if server.admin is defined %}
-mysql.user: '{{ server.admin.user }}'
-mysql.pass: '{{ server.admin.password }}'
-{%- else %}
-mysql.user: 'root'
-mysql.pass: ''
-{%- endif %}
-mysql.db: 'mysql'
-mysql.charset: 'utf8'
diff --git a/mysql/meta/salt.yml b/mysql/meta/salt.yml
new file mode 100644
index 0000000..a2a4675
--- /dev/null
+++ b/mysql/meta/salt.yml
@@ -0,0 +1,19 @@
+minion:
+ {%- if pillar.mysql.server is defined %}
+ mysql:
+ {%- from "mysql/map.jinja" import server with context -%}
+ mysql.unix_socket: /var/run/mysqld/mysqld.sock
+ {%- if server.admin is defined %}
+ mysql.user: '{{ server.admin.user }}'
+ mysql.pass: '{{ server.admin.password }}'
+ {%- else %}
+ mysql.user: 'root'
+ mysql.pass: ''
+ {%- endif %}
+ mysql.db: 'mysql'
+ mysql.charset: 'utf8'
+ {%- endif %}
+
+{#-
+ vim: syntax=jinja
+-#}
diff --git a/mysql/server/service.sls b/mysql/server/service.sls
index 42c494e..aaf5912 100644
--- a/mysql/server/service.sls
+++ b/mysql/server/service.sls
@@ -1,12 +1,5 @@
{%- from "mysql/map.jinja" import server, mysql_connection_args with context %}
-mysql_salt_config:
- file.managed:
- - name: /etc/salt/minion.d/mysql.conf
- - template: jinja
- - source: salt://mysql/files/salt-minion.conf
- - mode: 600
-
{%- if server.enabled %}
include: