-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
110 lines (108 loc) · 3.22 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
# Copyright 2018-2024 Chris Croome
#
# This file is part of the Webarchitects MariaDB Ansible role.
#
# The Webarchitects MariaDB Ansible role is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# The Webarchitects MariaDB Ansible role is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with the Webarchitects MariaDB Ansible role. If not, see <https://www.gnu.org/licenses/>.
---
mariadb: false
mariadb_config:
- name: MariaDB client configuration
path: /etc/mysql/mariadb.conf.d/50-client.cnf
state: edited
conf:
client:
default_character_set: utf8mb4
socket: "{{ mariadb_socket }}"
- name: MariaDB server configuration
path: /etc/mysql/mariadb.conf.d/50-server.cnf
state: edited
conf:
mysqld:
binlog_format: "ROW"
ignore_db_dir: "lost+found"
innodb_buffer_pool_instances: "1"
innodb_buffer_pool_size: "256M"
innodb_log_file_size: "64M"
join_buffer_size: "8M"
key_buffer_size: "16M"
max_allowed_packet: "64M"
max_connections: "80"
max_heap_table_size: "32M"
max_user_connections: "0"
open_files_limit: "122880"
query_cache_limit: "0"
query_cache_size: "0"
query_cache_type: "0"
skip_name_resolve:
slow_query_log_file: "/var/log/mysql/mariadb-slow.log"
table_cache: "64"
table_open_cache: "4000"
thread_concurrency: "10"
tmp_table_size: "32M"
transaction_isolation: "READ-COMMITTED"
performance_schema: "1"
- name: MariaDB mysqldump configuration
path: /etc/mysql/conf.d/mysqldump.cnf
state: present
conf:
mysqldump:
max_allowed_packet: "64M"
mariadb_config_file_path_prefix: /etc/mysql
mariadb_mysqltuner: true
mariadb_mysqltuner_version: "2.2.12"
mariadb_pkgs_absent: []
mariadb_pkgs_present:
- git
- jo
- mariadb-client
- mariadb-server
- mycli
- pwgen
- python3-mysqldb
- python3-pymysql
mariadb_socket: /run/mysqld/mysqld.sock
mariadb_systemd_units:
- name: mariadb
state: enabled
files:
- path: /etc/systemd/system/mariadb.service.d/mariadb.conf
conf:
Service:
NoNewPrivileges: "true"
PrivateNetwork: "true"
PrivateTmp: "true"
LimitNOFILE: "122880"
mariadb_systemd_units_file_path_prefix: /etc/systemd
mariadb_sys_schema: false
mariadb_time_zone_import: true
# mariadb_database:
# mariadb_mycnf:
# mariadb_mycnf_group:
# mariadb_mycnf_owner:
mariadb_mycnf_mode: "0600"
mariadb_priv:
- ALTER
- ALTER ROUTINE
- CREATE
- CREATE ROUTINE
- CREATE TEMPORARY TABLES
- CREATE VIEW
- DELETE
- DROP
- EXECUTE
- INDEX
- INSERT
- LOCK TABLES
- REFERENCES
- SELECT
- SHOW VIEW
- TRIGGER
- UPDATE
# mariadb_username:
mariadb_underscore_autoupdate: false
mariadb_verify: true
...