mysql-formula/pillar.example
Imran Iqbal 9f739fa8b4
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix (or ignore) errors shown below:

```bash
mysql-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
./mysql/osfamilymap.yaml
  4:1       warning  missing document start "---"  (document-start)
  5:6       error    syntax error: found character '%' that cannot start any token
  94:17     error    trailing spaces  (trailing-spaces)
  191:89    error    line too long (90 > 88 characters)  (line-length)

./mysql/defaults.yaml
  3:1       warning  missing document start "---"  (document-start)
  7:4       error    syntax error: found character '%' that cannot start any token
  44:89     error    line too long (93 > 88 characters)  (line-length)
  51:89     error    line too long (111 > 88 characters)  (line-length)
  58:89     error    line too long (104 > 88 characters)  (line-length)
  65:89     error    line too long (103 > 88 characters)  (line-length)
  71:89     error    line too long (95 > 88 characters)  (line-length)
  77:89     error    line too long (102 > 88 characters)  (line-length)
  83:89     error    line too long (101 > 88 characters)  (line-length)
  86:89     error    line too long (95 > 88 characters)  (line-length)
  90:89     error    line too long (95 > 88 characters)  (line-length)

./mysql/supported_sections.yaml
  2:2       error    syntax error: found character '%' that cannot start any token

./mysql/osmap.yaml
  4:4       error    syntax error: found character '%' that cannot start any token
  7:89      error    line too long (96 > 88 characters)  (line-length)
  8:89      error    line too long (97 > 88 characters)  (line-length)

pillar.example
  1:1       warning  missing document start "---"  (document-start)
  36:8      error    wrong indentation: expected 8 but found 7  (indentation)
  77:16     warning  truthy value should be one of [false, true]  (truthy)
  80:13     warning  truthy value should be one of [false, true]  (truthy)
  83:13     warning  truthy value should be one of [false, true]  (truthy)
  85:13     warning  truthy value should be one of [false, true]  (truthy)
  89:13     warning  truthy value should be one of [false, true]  (truthy)
  96:13     warning  truthy value should be one of [false, true]  (truthy)
  112:19    warning  truthy value should be one of [false, true]  (truthy)
  117:17    warning  too few spaces before comment  (comments)
  118:12    warning  truthy value should be one of [false, true]  (truthy)
  119:17    warning  truthy value should be one of [false, true]  (truthy)
  130:25    warning  truthy value should be one of [false, true]  (truthy)
  131:19    warning  truthy value should be one of [false, true]  (truthy)
  153:16    warning  truthy value should be one of [false, true]  (truthy)
  166:14    warning  truthy value should be one of [false, true]  (truthy)
  171:18    warning  truthy value should be one of [false, true]  (truthy)
  172:89    error    line too long (93 > 88 characters)  (line-length)
  175:18    warning  truthy value should be one of [false, true]  (truthy)
  176:89    error    line too long (111 > 88 characters)  (line-length)
  179:18    warning  truthy value should be one of [false, true]  (truthy)
  179:26    warning  missing starting space in comment  (comments)
  180:89    error    line too long (104 > 88 characters)  (line-length)
  183:18    warning  truthy value should be one of [false, true]  (truthy)
  183:26    warning  missing starting space in comment  (comments)
  184:89    error    line too long (103 > 88 characters)  (line-length)
  187:18    warning  truthy value should be one of [false, true]  (truthy)
  187:26    warning  missing starting space in comment  (comments)
  188:89    error    line too long (95 > 88 characters)  (line-length)
  191:18    warning  truthy value should be one of [false, true]  (truthy)
  191:26    warning  missing starting space in comment  (comments)
  192:89    error    line too long (102 > 88 characters)  (line-length)
  195:18    warning  truthy value should be one of [false, true]  (truthy)
  195:26    warning  missing starting space in comment  (comments)
  196:89    error    line too long (101 > 88 characters)  (line-length)
  199:18    warning  truthy value should be one of [false, true]  (truthy)
  199:26    warning  missing starting space in comment  (comments)
  200:89    error    line too long (95 > 88 characters)  (line-length)
  203:18    warning  truthy value should be one of [false, true]  (truthy)
  203:26    warning  missing starting space in comment  (comments)
  204:89    error    line too long (95 > 88 characters)  (line-length)
  207:18    warning  truthy value should be one of [false, true]  (truthy)
  207:26    warning  missing starting space in comment  (comments)
  211:18    warning  truthy value should be one of [false, true]  (truthy)
  211:26    warning  missing starting space in comment  (comments)
  214:1     error    too many blank lines (1 > 0)  (empty-lines)

test/salt/pillar/mysql.sls
  1:1       warning  missing document start "---"  (document-start)
  36:8      error    wrong indentation: expected 8 but found 7  (indentation)
  77:16     warning  truthy value should be one of [false, true]  (truthy)
  80:13     warning  truthy value should be one of [false, true]  (truthy)
  82:13     warning  truthy value should be one of [false, true]  (truthy)
  84:13     warning  truthy value should be one of [false, true]  (truthy)
  88:13     warning  truthy value should be one of [false, true]  (truthy)
  95:13     warning  truthy value should be one of [false, true]  (truthy)
  111:19    warning  truthy value should be one of [false, true]  (truthy)
  152:16    warning  truthy value should be one of [false, true]  (truthy)
  165:14    warning  truthy value should be one of [false, true]  (truthy)
  170:18    warning  truthy value should be one of [false, true]  (truthy)
  171:89    error    line too long (93 > 88 characters)  (line-length)
  174:18    warning  truthy value should be one of [false, true]  (truthy)
  175:89    error    line too long (111 > 88 characters)  (line-length)
  178:18    warning  truthy value should be one of [false, true]  (truthy)
  178:26    warning  missing starting space in comment  (comments)
  179:89    error    line too long (104 > 88 characters)  (line-length)
  182:18    warning  truthy value should be one of [false, true]  (truthy)
  182:26    warning  missing starting space in comment  (comments)
  183:89    error    line too long (103 > 88 characters)  (line-length)
  186:18    warning  truthy value should be one of [false, true]  (truthy)
  186:26    warning  missing starting space in comment  (comments)
  187:89    error    line too long (95 > 88 characters)  (line-length)
  190:18    warning  truthy value should be one of [false, true]  (truthy)
  190:26    warning  missing starting space in comment  (comments)
  191:89    error    line too long (102 > 88 characters)  (line-length)
  194:18    warning  truthy value should be one of [false, true]  (truthy)
  194:26    warning  missing starting space in comment  (comments)
  195:89    error    line too long (101 > 88 characters)  (line-length)
  198:18    warning  truthy value should be one of [false, true]  (truthy)
  198:26    warning  missing starting space in comment  (comments)
  199:89    error    line too long (95 > 88 characters)  (line-length)
  202:18    warning  truthy value should be one of [false, true]  (truthy)
  202:26    warning  missing starting space in comment  (comments)
  203:89    error    line too long (95 > 88 characters)  (line-length)
  206:18    warning  truthy value should be one of [false, true]  (truthy)
  206:26    warning  missing starting space in comment  (comments)
  210:18    warning  truthy value should be one of [false, true]  (truthy)
  210:26    warning  missing starting space in comment  (comments)
  213:1     error    too many blank lines (1 > 0)  (empty-lines)
```
2019-08-17 00:41:39 +01:00

227 lines
6.9 KiB
YAML

# -*- 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
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']
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'