51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
- name: Bind mariadb to all interfaces and IPs
|
|
ini_file: dest='{{ mysql_config_file }}'
|
|
section=mysqld
|
|
option=bind-address
|
|
value=0.0.0.0
|
|
notify: restart mariadb
|
|
|
|
- name: Set SQL mode to empty
|
|
ini_file: dest='{{ mysql_config_file }}'
|
|
section=mysqld
|
|
option=sql-mode
|
|
value="NO_AUTO_CREATE_USER"
|
|
notify: restart mariadb
|
|
|
|
- name: Disable name-resolution
|
|
ini_file: dest='{{ mysql_config_file }}'
|
|
section=mysqld
|
|
option=skip-name-resolve
|
|
value=1
|
|
notify: restart mariadb
|
|
|
|
- name: Enlarge innoDB buffer pool size
|
|
ini_file: dest='{{ mysql_config_file }}'
|
|
section=mysqld
|
|
option=innodb_buffer_pool_size
|
|
value=2G
|
|
notify: restart mariadb
|
|
|
|
- name: Enlarge max connections
|
|
ini_file: dest='{{ mysql_config_file }}'
|
|
section=mysqld
|
|
option=max_connections
|
|
value=8000
|
|
notify: restart mariadb
|
|
|
|
- name: Set thread cache size
|
|
ini_file: dest='{{ mysql_config_file }}'
|
|
section=mysqld
|
|
option=thread_cache_size
|
|
value=8000
|
|
notify: restart mariadb
|
|
|
|
- name: Run custom rules
|
|
ini_file: dest='{{ mysql_config_file }}'
|
|
section={{ item.section }}
|
|
option={{ item.option }}
|
|
value={{ item.value }}
|
|
with_items:
|
|
- "{{ mysql_custom_rules }}"
|
|
notify: restart mariadb
|