2019-12-02 14:55:41 +01:00
|
|
|
{%- set mysql_root_user = salt['pillar.get']('mysql:server:root_user', 'root') %}
|
|
|
|
{%- set mysql_root_pass = salt['pillar.get']('mysql:server:root_password', salt['grains.get']('server_id')) %}
|
|
|
|
{%- set mysql_host = salt['pillar.get']('mysql:server:host', 'localhost') %}
|
|
|
|
{%- set mysql_salt_user = salt['pillar.get']('mysql:salt_user:salt_user_name', mysql_root_user) %}
|
|
|
|
{%- set mysql_salt_pass = salt['pillar.get']('mysql:salt_user:salt_user_password', mysql_root_pass) %}
|
2014-10-10 17:46:45 +10:00
|
|
|
|
|
|
|
include:
|
2018-05-18 13:40:36 +02:00
|
|
|
- .python
|
2014-10-10 17:46:45 +10:00
|
|
|
|
|
|
|
mysql remove test database:
|
|
|
|
mysql_database.absent:
|
|
|
|
- name: test
|
2015-04-15 19:06:07 +02:00
|
|
|
- host: '{{ mysql_host }}'
|
2015-10-08 12:06:25 +02:00
|
|
|
- connection_user: '{{ mysql_salt_user }}'
|
2018-03-16 23:41:52 +01:00
|
|
|
- connection_host: '{{ mysql_host }}'
|
2019-12-02 14:55:41 +01:00
|
|
|
{%- if mysql_salt_pass %}
|
2015-10-08 12:06:25 +02:00
|
|
|
- connection_pass: '{{ mysql_salt_pass }}'
|
2019-12-02 14:55:41 +01:00
|
|
|
{%- endif %}
|
2014-10-10 17:46:45 +10:00
|
|
|
- connection_charset: utf8
|