mirror of
https://github.com/saltstack-formulas/mysql-formula.git
synced 2025-04-17 10:10:30 +00:00
18 lines
766 B
Text
18 lines
766 B
Text
{% 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) %}
|
|
|
|
include:
|
|
- mysql.python
|
|
|
|
mysql remove test database:
|
|
mysql_database.absent:
|
|
- name: test
|
|
- host: '{{ mysql_host }}'
|
|
- connection_user: '{{ mysql_salt_user }}'
|
|
{% if mysql_salt_pass %}
|
|
- connection_pass: '{{ mysql_salt_pass }}'
|
|
{% endif %}
|
|
- connection_charset: utf8
|