Ansible roles by Evolix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jérémy Lecour 1e3ac40167 mysql: Munin must use the debian-sys-maint user 2 months ago
..
defaults Allow setting a custom mysql server_id 8 months ago
files mysql: fix slow_log config 2 years ago
handlers mysql: add a variable to prevent mysql from restarting 1 year ago
meta change repositories URL 1 year ago
tasks mysql: Munin must use the debian-sys-maint user 2 months ago
templates Allow setting a custom mysql server_id 8 months ago
tests Add tests for many roles 3 years ago
vars mysql: mysql_variant=[oracle/mariadb] 3 years ago
.kitchen.yml Kitchen: Change base image to evolix/ansible 3 years ago
README.md Allow setting a custom mysql server_id 8 months ago

README.md

mysql

Install MySQL

Tasks

Tasks are extracted in several files, included in tasks/main.yml :

  • packages.yml : packages installation ;
  • users.yml : replacement of root user by mysqladmin user ;
  • config.yml : configurations ;
  • datadir.yml : data directory customization ;
  • tmpdir.yml : temporary directory customization ;
  • nrpe.yml : nrpe user for Nagios checks ;
  • munin.yml : Munin plugins ;
  • log2mail.yml : log2mail patterns ;
  • utils.yml : useful tools.

Available variables

  • mysql_variant : install Oracle's MySQL or MariaDB (default: oracle) [Debian 8 only];
  • mysql_replace_root_with_mysqladmin: switch from root to mysqladmin user or not ;
  • mysql_thread_cache_size: number of threads for the cache ;
  • mysql_innodb_buffer_pool_size: amount of RAM dedicated to InnoDB ;
  • mysql_bind_address : (default: Null, default evolinux config is then used) ;
  • mysql_max_connections: maximum number of simultaneous connections (default: Null, default evolinux config is then used) ;
  • mysql_max_connect_errors: number of permitted successive interrupted connection requests before a host gets blocked (default: Null, default evolinux config is then used) ;
  • mysql_table_cache: (default: Null, default evolinux config is then used) ;
  • mysql_tmp_table_size: (default: Null, default evolinux config is then used) ;
  • mysql_max_heap_table_size: (default: Null, default evolinux config is then used) ;
  • mysql_query_cache_limit: (default: Null, default evolinux config is then used) ;
  • mysql_query_cache_size: (default: Null, default evolinux config is then used) ;
  • mysql_log_bin: (default: Null, activates binlogs if used) ;
  • mysql_server_id: (default: Null, MySQL version default is then used) ;
  • mysql_custom_datadir: custom datadir.
  • mysql_custom_tmpdir: custom tmpdir.
  • general_alert_email: email address to send various alert messages (default: root@localhost).
  • log2mail_alert_email: email address to send Log2mail messages to (default: general_alert_email).
  • general_scripts_dir: general directory for scripts installation (default: /usr/local/bin).
  • mysql_scripts_dir: email address to send Log2mail messages to (default: general_scripts_dir).
  • mysql_force_new_nrpe_password : change the password for NRPE even if it exists already (default: False).
  • mysql_install_libclient: install mysql client libraries (default: False).
  • mysql_restart_if_needed : should the restart handler be executed (default: True)

NB : changing the datadir location can be done multiple times, as long as it is not restored to the default initial location, (because a symlink is created and can't be switched back, yet).