inmotionhosting.mysql
Ansible Role: MySQL
This is a modular Ansible Role designed to deploy and set up MySQL/MariaDB.
Requirements
This role supports the two most recent stable versions of specific Linux distributions that focus on servers. It aims to keep in line with their end-of-life policies. Currently, it supports:
- CentOS 7.x
- Debian 10 or newer
- Ubuntu 20.04 LTS or newer
- AlmaLinux 8.x or newer
- RockyLinux 8.x or newer
Dependencies
- community.mysql
Role Variables
Here are the available variables along with their default values (you can also check the defaults/main.yml
file):
Variable | Description |
---|---|
mysql_config_file | Default: /etc/my.cnf |
mysql_config_include_dir | Default: /etc/my.cnf.d |
mysql_daemon | Default: mariadb |
mysql_innodb_buffer_pool_size | Default: 128M |
mysql_innodb_file_per_table | Default: 1 |
mysql_innodb_log_buffer_size | Default: 16M |
mysql_innodb_log_file_size | Default: 96M |
mysql_log_dir | Default: /var/log/ |
mysql_log_error | Default: "{{ mysql_log_dir }}/mariadb/mariadb.log" |
mysql_log_file_group | Default: mysql |
mysql_log_warning | Default: 1 |
mysql_packages | Default: The MySQL packages to install |
mysql_query_alloc_block_size | Default: 16384 |
mysql_query_cache_limit | Default: 1M |
mysql_query_cache_min_res_unit | Default: 4096 |
mysql_query_cache_size | Default: 16M |
mysql_query_cache_strip_comments | Default: 0 |
mysql_query_cache_type | Default: 1 |
mysql_query_cache_wlock_invalidate | Default: 0 |
mysql_query_prealloc_size | Default: 24576 |
mysql_root_home | Default: /root |
mysql_root_password_update | Default: false |
mysql_root_username | Default: root |
mysql_slow_query_log_enabled | Default: true |
mysql_slow_query_log_file | Default: "{{ mysql_log_dir }}/mysql-slow.log" |
mysql_socket | Default: true |
mysql_socket_path | Default: /var/lib/mysql/mysql.sock |
mysql_supports_innodb_large_prefix | Default: true |
mysql_syslog_tag | Default: mariadb |
password_generate | Default: "{{ lookup('password', '/dev/null length=15 chars=ascii_letters') }}" |
Example Playbook
Here’s a simple example of how to use this role in a playbook:
- hosts: www
roles:
- role: inmotionhosting.mysql
License
This project is licensed under the GPLv3.
Author Information
Informazioni sul progetto
Modular Ansible Role for deploying and configuring MySQL/MariaDB
Installa
ansible-galaxy install inmotionhosting.mysql
Licenza
gpl-3.0
Download
54.1k
Proprietario
Offering Private and Public Cloud, Software as a Service, and Web Hosting