pludoni/mysql

Name: mysql

Owner: pludoni GmbH

Description: Ansible role for MySQL

Created: 2017-07-16 21:27:12.0

Updated: 2017-07-16 21:27:13.0

Pushed: 2017-07-16 21:29:03.0

Homepage: null

Size: 46

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ANXS - MySQL Build Status

Ansible role that installs MySQL on (for now) Ubuntu variants. Features include:

Requirements & Dependencies Variables
sic settings
l_port: 3306                        # The port on which mysql listens
l_bind_address: '0.0.0.0'           # The address the mysql server binds on
l_root_password: ''                 # The new root password
l_default_root_password: ''         # The root password
l_ppa: ''                           # Install MySQL from PPA repository
l_apt_key: ''

ne Tuning
l_key_buffer: '16M'
l_max_allowed_packet: '128M'
l_thread_stack: '192K'
l_cache_size: 8
l_myisam_recover: 'BACKUP'
l_max_connections: 100
l_table_cache: 64
l_thread_concurrency: 10
l_query_cache_limit: '1M'
l_query_cache_size: '16M'
l_character_set_server: 'utf8'
l_collation_server: 'utf8_general_ci'
l_mysqldump_max_allowed_packet: '128M'
l_isamchk_key_buffer: '16M'

noDB tuning
l_innodb_file_per_table: 'innodb_file_per_table'
l_innodb_flush_method: 'fdatasync'
l_innodb_buffer_pool_size: '128M'
l_innodb_flush_log_at_trx_commit: 1
l_innodb_lock_wait_timeout: 50
l_innodb_log_buffer_size: '1M'
l_innodb_log_file_size: '5M'

st of databases to be created (optional)
l_databases:
name: foobar
collation: "utf8_general_ci"        # optional, defaults to "utf8_general_ci"
encoding: "utf8"                    # optional, defaults to "utf8"

st of users to be created (optional)
l_users:
name: baz
pass: pass
priv: "*.*:ALL"                     # optional, defaults to "*.*:ALL"
host: "%"                           # optional, defaults to "localhost"

OBAL Setting
t_protection: false                 # true or false, requires ANXS.monit

st of apt packages to install
l_packages:
mysql-server
mysql-client
python-mysqldb

Setting/Updating the root Password

If You would like to change your mysql root password using this role, ensure you use the following variables in your play:

l_default_root_password: <Your current root password>
l_root_password: <Your new root password>
Testing

This project comes with a VagrantFile, this is a fast and easy way to test changes to the role, fire it up with vagrant up, provision the box with either:

vagrant provision

This also happens automatically after the first vagrant up, or:

ansible-playbook test.yml -i vagrant-inventory --sudo

This is the ansible way, and will easily allow command line arguments like --tags and -e

See vagrant docs for getting setup with vagrant

License

Licensed under the MIT License. See the LICENSE file for details.

Feedback, bug-reports, requests, …

Are welcome!


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.