Skip to content

larixsource/ansible-ec2-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-ec2-mysql

Ansible role to install MySQL in Ubuntu Trusty, in EC2 using an EBS volume.

This role performs an standard installation in Trusty (apt-get install mysql-server), runs mysql_secure_installation and configures the server to use an EBS volume following the instructions of https://aws.amazon.com/articles/1663.

Requirements

None.

Role Variables

  • mysql_version: mysql server version, by default 5.5 (5.6 also available)
  • mysql_use_ebs: if an EBS volume should be used, by default false
  • mysql_ebsdev: EBS volume block device, by defaul xvdf
  • mysql_root_passwd: mysql root password, by default 'supersecret', yo should overwrite this
  • mysql_rm_anon_user: if the anonymous user should be removed (y or n), by default y
  • mysql_disallow_root_remote_login: if the remote root login should be disallowed (y or n), by default y
  • mysql_rm_test_db: if the test database should be removed (y or n), by default y

Dependencies

None.

Example Playbook

The two relevant variables are mysql_ebsdev and mysql_root_password, the former is the block device associated to the EBS volume (in Trusty will be xvdf, xvdg, xvdh, and so on) and the later is the password of the root user (in mysql, obviously).

- hosts: servers
  roles:
     - { role: larixsource.ec2-mysql, mysql_ebsdev: 'xvdg', mysql_root_password: 'supersecret' }

Also, there's an example of provisioning with Vagrant in a local VM in the directory test.

License

Apache-2.0

Author Information

Courtesy of Larix team.

About

Ansible role to install MySQL in Ubuntu Trusty, in EC2 using an EBS volume

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published