2013-08-19 10:03:59 -05:00
|
|
|
mysql:
|
2015-10-02 17:37:39 +02:00
|
|
|
global:
|
|
|
|
client-server:
|
|
|
|
default_character_set: utf8
|
|
|
|
|
|
|
|
clients:
|
|
|
|
mysql:
|
|
|
|
default_character_set: utf8
|
|
|
|
mysqldump:
|
|
|
|
default_character_set: utf8
|
|
|
|
|
|
|
|
library:
|
|
|
|
client:
|
|
|
|
default_character_set: utf8
|
|
|
|
|
2013-08-19 10:03:59 -05:00
|
|
|
server:
|
2015-05-18 10:49:17 -04:00
|
|
|
# Use this account for database admin (defaults to root)
|
|
|
|
root_user: 'admin'
|
2015-06-24 13:18:30 -04:00
|
|
|
# root_password: '' - to have root@localhost without password
|
2014-05-15 16:40:02 -04:00
|
|
|
root_password: 'somepass'
|
2015-10-08 12:06:25 +02:00
|
|
|
root_password_hash: '*13883BDDBE566ECECC0501CDE9B293303116521A'
|
2013-08-19 10:03:59 -05:00
|
|
|
user: mysql
|
2015-04-15 19:06:07 +02:00
|
|
|
# If you only manage the dbs and users and the server is on
|
|
|
|
# another host
|
|
|
|
host: 123.123.123.123
|
2015-10-05 21:44:20 +02:00
|
|
|
# my.cnf sections changes
|
2014-09-29 00:08:11 +09:00
|
|
|
mysqld:
|
2014-12-12 10:05:39 +08:00
|
|
|
# you can use either underscore or hyphen in param names
|
2014-09-29 00:08:11 +09:00
|
|
|
bind-address: 0.0.0.0
|
2014-12-12 10:05:39 +08:00
|
|
|
log_bin: /var/log/mysql/mysql-bin.log
|
2016-10-09 18:25:43 +00:00
|
|
|
datadir: /var/lib/mysql
|
2014-09-29 00:08:11 +09:00
|
|
|
port: 3307
|
2014-12-12 10:05:39 +08:00
|
|
|
binlog_do_db: foo
|
2014-09-29 00:08:11 +09:00
|
|
|
auto_increment_increment: 5
|
2016-10-02 13:41:10 +03:00
|
|
|
binlog-ignore-db:
|
|
|
|
- mysql
|
|
|
|
- sys
|
|
|
|
- information_schema
|
|
|
|
- performance_schema
|
2014-09-29 00:08:11 +09:00
|
|
|
mysql:
|
|
|
|
# my.cnf param that not require value
|
|
|
|
no-auto-rehash: noarg_present
|
2013-08-16 15:26:39 -06:00
|
|
|
|
2015-10-08 12:06:25 +02:00
|
|
|
salt_user:
|
|
|
|
salt_user_name: 'salt'
|
|
|
|
salt_user_password: 'someotherpass'
|
|
|
|
grants:
|
|
|
|
- 'all privileges'
|
|
|
|
|
2014-05-12 11:47:51 -04:00
|
|
|
# Manage databases
|
|
|
|
database:
|
|
|
|
- foo
|
2014-06-19 22:48:59 +02:00
|
|
|
- bar
|
2014-07-26 23:48:56 -07:00
|
|
|
schema:
|
|
|
|
foo:
|
|
|
|
load: True
|
|
|
|
source: salt://mysql/files/foo.schema
|
|
|
|
bar:
|
|
|
|
load: False
|
2015-03-18 12:45:24 -07:00
|
|
|
baz:
|
|
|
|
load: True
|
|
|
|
source: salt://mysql/files/baz.schema.tmpl
|
|
|
|
template: jinja
|
2016-09-11 06:25:16 -04:00
|
|
|
qux:
|
|
|
|
load: True
|
|
|
|
source: salt://mysql/files/qux.schema.tmpl
|
|
|
|
template: jinja
|
|
|
|
context:
|
|
|
|
encabulator: Turbo
|
|
|
|
girdlespring: differential
|
|
|
|
quux:
|
|
|
|
load: True
|
|
|
|
source: salt://mysql/files/qux.schema.tmpl
|
|
|
|
template: jinja
|
|
|
|
context:
|
|
|
|
encabulator: Retro
|
|
|
|
girdlespring: integral
|
2014-05-12 11:47:51 -04:00
|
|
|
|
2014-05-12 12:24:16 -04:00
|
|
|
# Manage users
|
2016-01-28 12:53:26 +01:00
|
|
|
# you can get pillar for existing server using scripts/import_users.py script
|
2014-05-12 12:24:16 -04:00
|
|
|
user:
|
2014-11-02 00:24:55 -04:00
|
|
|
frank:
|
2014-05-15 16:40:02 -04:00
|
|
|
password: 'somepass'
|
2014-05-12 12:24:16 -04:00
|
|
|
host: localhost
|
|
|
|
databases:
|
|
|
|
- database: foo
|
|
|
|
grants: ['select', 'insert', 'update']
|
|
|
|
- database: bar
|
|
|
|
grants: ['all privileges']
|
2014-11-02 00:24:55 -04:00
|
|
|
bob:
|
2014-05-15 16:40:02 -04:00
|
|
|
password_hash: '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4'
|
2014-05-12 12:24:16 -04:00
|
|
|
host: localhost
|
2016-08-16 14:19:53 +02:00
|
|
|
ssl: True
|
|
|
|
ssl-X509: True
|
|
|
|
ssl-SUBJECT: Subject
|
|
|
|
ssl-ISSUER: Name
|
|
|
|
ssl-CIPHER: Cipher
|
2014-05-12 12:24:16 -04:00
|
|
|
databases:
|
|
|
|
- database: foo
|
|
|
|
grants: ['all privileges']
|
2014-09-29 00:08:11 +09:00
|
|
|
grant_option: True
|
2014-05-12 12:24:16 -04:00
|
|
|
- database: bar
|
2014-09-29 00:08:11 +09:00
|
|
|
table: foobar
|
2014-05-12 12:24:16 -04:00
|
|
|
grants: ['select', 'insert', 'update', 'delete']
|
2014-11-02 00:24:55 -04:00
|
|
|
nopassuser:
|
2014-08-07 19:24:59 +03:00
|
|
|
password: ~
|
|
|
|
host: localhost
|
|
|
|
databases: []
|
2016-03-17 11:53:32 +01:00
|
|
|
application:
|
|
|
|
password: 'somepass'
|
|
|
|
mine_hosts:
|
|
|
|
target: "G@role:database and *.example.com"
|
|
|
|
function: "network.get_hostname"
|
|
|
|
expr_form: compound
|
|
|
|
databases:
|
|
|
|
- database: foo
|
|
|
|
grants: ['select', 'insert', 'update']
|
2014-05-12 12:24:16 -04:00
|
|
|
|
2013-09-03 13:34:10 -06:00
|
|
|
# Override any names defined in map.jinja
|
2016-10-28 19:59:34 -03:00
|
|
|
# lookup:
|
|
|
|
# server: mysql-server
|
|
|
|
# client: mysql-client
|
|
|
|
# service: mysql-service
|
|
|
|
# python: python-mysqldb
|
2014-12-12 09:20:09 +11:00
|
|
|
|
|
|
|
# Install MySQL headers
|
|
|
|
dev:
|
2015-06-02 10:50:38 +08:00
|
|
|
# Install dev package - defaults to False
|
|
|
|
install: False
|
2015-03-10 07:40:19 +11:00
|
|
|
|