-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmain.yml
122 lines (108 loc) · 3.89 KB
/
main.yml
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
---
## General
mysql_flavour: mysql
# Alt option:
# mysql_flavour: mariadb
mysql_version: 0.8.19-1
# If looking for an specific mysql version:
# mysql_server_version: mysql-5.7
mysql_oracle_gpg_keyserver: keyserver.ubuntu.com
mysql_oracle_gpg_key: B7B3B788A8D3785C
mysql_required_libs:
- python3-mysqldb
# Alt option for mariadb:
# mysql_version: 10.5
# mysql_key_url: https://mariadb.org/mariadb_release_signing_key.asc
# mysql_repository_url: 'deb [arch=amd64,i386,ppc64el] http://mirror.23media.de/mariadb/repo/{{ mysql_version }}/debian {{ ansible_distribution_release }} main'
mysql_user: mysql
mysql_group: mysql
## Service options
# start on boot
mysql_service_enabled: true
# current state: started, stopped
mysql_service_state: started
# The values below are the ones by default. To change the value of any of these options uncomment it and modify it.
# mysql_private_tmp: false
# mysql_private_network: false
# mysql_private_devices: true
# mysql_protect_system: full
# mysql_protect_home: true
# Files & Paths
mysql_config_template: my.cnf.j2
mysql_service_template: "{{ mysql_flavour }}.service.j2"
mysql_config_file: /etc/mysql/my.cnf
mysql_pid_file: /var/run/mysqld/mysqld.pid
mysql_datadir: /var/lib/mysql
mysql_share_dir: /usr/share/mysql-8.0 # /usr/share/mysql for mysql 5
# Allowing playbooks to provide external option files
mysql_extra_conf_include_dir: /etc/mysql/conf.d
mysql_extra_conf_playbook_path: "{{ playbook_dir }}/files/mysql/conf"
mysql_extra_conf_template_playbook_path: "{{ playbook_dir }}/templates/mysql/conf"
# Databases.
mysql_databases: []
# - name: example
# collation: utf8_general_ci
# encoding: utf8
# Users.
mysql_root_user: root
mysql_root_password: default
mysql_users: []
# - name: example
# host: 127.0.0.1
# password: secret
# priv: [ '*.*:USAGE' ]
# Remounting settings
mysql_remount_run: true
## This variable has to include the magnitude M,G...
mysql_remount_run_partition_size: 512M
## Options file groups with options to define System variables
## Check https://dev.mysql.com/doc/refman/5.7/en/option-files.html
##
## Use 'SHOW VARIABLES' (https://dev.mysql.com/doc/refman/5.7/en/show-variables.html)
## to show available system variables or check
## https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html
mysql_global_variables:
include_dirs:
- "{{ mysql_extra_conf_include_dir }}"
groups:
client:
user: "{{ mysql_user }}"
password: "{{ mysql_root_password }}"
port: 3306
socket: /var/run/mysqld/mysqld.sock
mysqld:
port: 3306
bind_address: 0.0.0.0
socket: /var/run/mysqld/mysqld.sock
basedir: /usr/
tmpdir: /tmp
datadir: "{{ mysql_datadir }}"
lc_messages_dir: "{{ mysql_share_dir }}"
pid_file: "{{ mysql_pid_file }}"
slow_launch_time: 2
key_buffer_size: 256M
max_allowed_packet: 64M
table_open_cache: 256
sort_buffer_size: 1M
read_buffer_size: 1M
read_rnd_buffer_size: 4M
thread_cache_size: 8
max_connections: 151
wait_timeout: 28800
sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
innodb_file_per_table: "ON"
innodb_buffer_pool_size: 256M
innodb_flush_log_at_trx_commit: 1
innodb_lock_wait_timeout: 50
innodb_log_file_size: 64M
innodb_log_buffer_size: 8M
general_log_file: /var/log/mysql/mysql.log
slow_query_log_file: /var/log/mysql/mysql-slow.log
slow_query_log: "ON"
mysqldump:
quick: 1
max_allowed_packet: 64M
mysql_safe:
pid_file: "{{ mysql_pid_file }}"
socket: /var/run/mysqld/mysqld.sock
nice: 0