This role installs MariaDB on Debian. It also installs python-mysqldb.
On first run, the test database and test user is removed. A .my.cnf config file is written in /root so you can connect without entering a password with any mariadb/mysql client as user root.
Debian Wheezy/Jessie with the package python-pycurl and python-software-properties installed.
All the following variables are set in defaults.
Obviously, the mariadb_root_password would be a good candidate to set. if you add passwords to a version control system, use ansible-vault, or git-crypt
Because this role is for a clean install - it assumes an empty root password. The tasks for resetting the root password are only run on install/first activation of the service.
# The root password is set, and added to .my.cnf for the root user
mariadb_root_password: "secret"
mariadb_base_dir: "/usr"
mariadb_bind_address: "127.0.0.1"
mariadb_charsets_dir: "/usr/share/mysql/charsets"
mariadb_config: "/etc/mysql/my.cnf"
mariadb_data_dir: "/var/lib/mysql"
mariadb_install_db_bin: "/usr/bin/mysql_install_db"
mariadb_log_bin: false
mariadb_long_query_time: 10
mariadb_mysql_errorlog: "/var/log/mysql/mysql.err"
mariadb_mysqld_errorlog: "/var/log/mysql/mysqld.err"
mariadb_mysqld_slowlog: "/var/log/mysql/mysqld.slow"
mariadb_pid: "/var/run/mysqld/mysqld.pid"
mariadb_port: 3306
mariadb_query_cache_limit: false # 128K
mariadb_query_cache_size: false # 64M
mariadb_root_password: "secret"
mariadb_server_id: 1
mariadb_share_dir: "/usr/share/mysql"
mariadb_skip_charset_handshake: true
mariadb_skip_networking: false
mariadb_socket: "/var/run/mysqld/mysqld.sock"
mariadb_version: 10.2
- hosts: servers
roles:
- { role: f500.mariadb, mariadb_root_password: some_random_string }
LGPLv3
Jasper N. Brouwer, [email protected]
Ramon de la Fuente, [email protected]