An Ansible Role to install and configure mariadb.
An Ansible Role to install and configure mariadb.
mariadb is one of the most popular database servers.
Made by the original developers of MySQL.
This role installs and configures mariadb.
Used Modules:
Install from Ansible Galaxy
ansible-galaxy install while_true_do.srv_mariadb
Install from Github
git clone https://github.com/while-true-do/ansible-role-srv_mariadb.git while_true_do.srv_mariadb
---
# defaults file for while_true_do.srv_mariadb
# Define the source of installation
# Currently only distribution packages are supported
wtd_srv_mariadb_source: "distribution"
## Package Management
wtd_srv_mariadb_package:
- mariadb-server
- python3-mysql
# State can be present|latest|absent
wtd_srv_mariadb_package_state: "present"
## Configuration Management
wtd_srv_mariadb_conf_root_pass: ""
wtd_srv_mariadb_conf_my_path: "/etc/my.cnf"
wtd_srv_mariadb_conf_server_path: "/etc/my.cnf.d/mariadb-server.cnf"
wtd_srv_mariadb_conf_server:
port: "3306"
bind_address: "127.0.0.1"
character_set: "utf8mb4"
symbolic_links: "0"
data_dir: "/var/lib/mysql"
socket: "/var/lib/mysql/mysql.sock"
wtd_srv_mariadb_conf_innodb:
file_per_table: "true"
buffer_pool_size: "128M"
wtd_srv_mariadb_conf_query_cache:
type: "1"
limit: "256K"
min_res_unit: "2k"
cache_size: "64M"
## Service Management
wtd_srv_mariadb_service: "mariadb"
# State can be started|stopped
wtd_srv_mariadb_service_state: "started"
wtd_srv_mariadb_service_enabled: true
## Firewalld Management
wtd_srv_mariadb_fw_mgmt: true
wtd_srv_mariadb_fw_service: "mysql"
# State can be enabled|disabled
wtd_srv_mariadb_fw_state: "enabled"
# Zone can be according to defined zones on your machine.
wtd_srv_mariadb_fw_zone: "public"
## Host Management
wtd_srv_mariadb_reboot_enabled: true
wtd_srv_mariadb_reboot_msg: "System is going down to ..."
wtd_srv_mariadb_reboot_timeout: 3600
Running Ansible
Roles
can be done in a
playbook.
---
- hosts: all
roles:
- role: while_true_do.srv_mariadb
wtd_srv_mariadb_conf_root_pass: "myPassword"
- hosts: all
roles:
- role: while_true_do.srv_mariadb
wtd_srv_mariadb_conf_root_pass: "myPassword"
wtd_srv_mariadb_conf_server:
port: "3306"
bind_address: "0.0.0.0"
Most of the “generic” tests are located in the
Test Library.
Ansible specific testing is done with
Molecule.
Infrastructure testing is done with
testinfra.
Automated testing is done with Travis CI.
Thank you so much for considering to contribute. We are very happy, when somebody
is joining the hard work. Please fell free to open
Bugs, Feature Requests
or Pull Requests after
reading the Contribution Guideline.
See who has contributed already in the kudos.txt.
This work is licensed under a BSD-3-Clause License.