forked from saltstack-formulas/mysql-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pillar.example
235 lines (223 loc) · 7.2 KB
/
pillar.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
mysql:
global:
client-server:
default_character_set: utf8
clients:
mysql:
default_character_set: utf8
mysqldump:
default_character_set: utf8
library:
client:
default_character_set: utf8
server:
# Use this account for database admin (defaults to root)
root_user: 'admin'
# root_password: '' - to have root@localhost without password
root_password: 'somepass'
root_password_hash: '*13883BDDBE566ECECC0501CDE9B293303116521A'
user: mysql
# If you only manage the dbs and users and the server is on
# another host
host: 123.123.123.123
# my.cnf sections changes
mysqld:
# you can use either underscore or hyphen in param names
bind-address: 0.0.0.0
log_bin: /var/log/mysql/mysql-bin.log
datadir: /var/lib/mysql
port: 3307
binlog_do_db: foo
auto_increment_increment: 5
binlog-ignore-db:
- mysql
- sys
- information_schema
- performance_schema
explicit_defaults_for_timestamp: 1 # strict ansi supports sane defaults
mysql:
# my.cnf param that not require value
no-auto-rehash: noarg_present
salt_user:
salt_user_name: 'salt'
salt_user_password: 'someotherpass'
grants:
- 'all privileges'
# Manage config
config:
file: ~/.my.cnf
sections:
client:
port: 33306
socket: /var/lib/mysql-socket/mysql.sock
mysqld_safe:
plugin-dir: '~/mysql/plugins'
mysqld:
user: myself
port: 33306
datadir: ~/mysql/datadir
apparmor:
dir: /etc/apparmor.d/local
file: usr.sbin.mysqld
# Manage databases
database:
# Simple definition using default charset and collate
- foo
# Detailed definition
- name: bar
character_set: utf8
collate: utf8_general_ci
# Delete DB
- name: obsolete_db
present: false
schema:
foo:
load: true
source: salt://{{ tpldir }}/files/foo.schema
bar:
load: false
baz:
load: true
source: salt://{{ tpldir }}/files/baz.schema.tmpl
template: jinja
qux:
load: true
source: salt://{{ tpldir }}/files/qux.schema.tmpl
template: jinja
context:
encabulator: Turbo
girdlespring: differential
quux:
load: true
source: salt://{{ tpldir }}/files/qux.schema.tmpl
template: jinja
context:
encabulator: Retro
girdlespring: integral
# Manage users
# you can get pillar for existing server using scripts/import_users.py script
user:
frank:
password: 'somepass'
host: localhost
databases:
- database: foo
grants: ['select', 'insert', 'update']
escape: true
- database: bar
grants: ['all privileges']
bob:
password_hash: '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4'
host: '%' # Any host
ssl: true
ssl-X509: true
ssl-SUBJECT: Subject
ssl-ISSUER: Name
ssl-CIPHER: Cipher
databases:
# https://github.com/saltstack/salt/issues/41178
# If you want to refer to databases using wildcards, turn off escape so
# the renderer does not escape them, enclose the string in '`' and
# use two '%'
- database: '`foo\_%%`'
grants: ['all privileges']
grant_option: true
escape: false
- database: bar
table: foobar
grants: ['select', 'insert', 'update', 'delete']
# User 'alice' will be allowed to connect to the server without password
# as long as she has access to the unix socket.
# This option forces allow_passwordless to be set to True
alice:
host: 'localhost'
unix_socket: true
nopassuser:
password: ~
host: localhost
databases: []
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']
# Remove a user
obsoleteuser:
host: localhost
# defaults to true
present: false
# Override any names defined in map.jinja
# serverpkg: mysql-server
# clientpkg: mysql-client
# service: mysql
# pythonpkg: python-mysqldb
# devpkg: mysql-devel
# debconf_utils: debconf-utils
# Install MySQL headers
dev:
# Install dev package - defaults to false
install: false
macos:
products:
community_server:
enabled: true # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-8.0.11-macos10.13-x86_64.dmg
sum: 'md5=602a84390ecf3d82025b1d99fc594124'
workbench:
enabled: true # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-workbench-community-8.0.11-rc-macos-x86_64.dmg
sum: 'md5=37c5ae5bd75a4e1804ae6e0127d68611'
cluster:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-cluster-gpl-7.6.6-macos10.13-x86_64.dmg
sum: 'md5=0df975908e7d8e4e8c1003d95edf4721'
router:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-router-8.0.11-macos10.13-x86-64bit.dmg
sum: 'md5=8dd536f2f223933ecbfb8b19e54ee2f6'
utilities:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-utilities-1.6.5-macos10.12.dmg
sum: 'md5=4c8e75bb217b8293dcdeb915b649c2c8'
shell:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-shell-8.0.11-macos10.13-x86-64bit.dmg
sum: 'md5=43db4f0fc39f88c1d7be4a4f52cec363'
proxy:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-proxy-0.8.5-osx10.7-x86-32bit.tar.gz
sum: 'md5=107df22412aa8c483d2021e1af24ee22'
connector:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-connector-nodejs-8.0.11.tar.gz
sum: 'md5=dece7fe5607918ba68499ef07c31508d'
forvisualstudio:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-for-visualstudio-2.0.4-src.zip
sum: 'md5=fcf39316505ee2921e31a431eae77a9c'
forexcel:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-for-excel-1.3.6-src.zip
sum: 'md5=2cc8b65eb72a1b07a6e4e2665e2a29e3'
notifier:
enabled: false # default
# yamllint disable-line rule:line-length
url: https://downloads.mysql.com/archives/get/file/mysql-notifier-1.1.6-src.zip
sum: 'md5=349f1994681763fd6626a8ddf6be5363'