This roles installs the Mysql Server, the setup is very basic and is really only meant local MySQL testing in VMs.
This role is designed to work with merge "hash_behaviour". Make sure your ansible.cfg contains these settings
[defaults]
hash_behaviour = merge
To install run ansible-galaxy install sansible.mysql
or add this to your
roles.yml
.
- name: sansible.mysql
version: v1.0
and run ansible-galaxy install -p ./roles -r roles.yml
This role uses one tag: build
build
- Installs Mysql and all it's dependencies.configure
- Configures mysql
mysql:
# Root user and pass should be stored using ansible-vault
root_user: root
root_password: P4ssword!
version: 5.5
To install:
- name: Install and configure Mysql Server
hosts: "somehost"
roles:
- role: sansible.mysql
Setup Mysql with root user and password:
- name: Install and configure Mysql
hosts: "somehost"
roles:
- role: sansible.mysql
sansible_mysql_root_user: different_root_user
sansible_mysql_root_password: secure_password