2015-07-13 17:32:49 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: SHELL | Get MariaDB target version
|
|
|
|
shell: LANG=C apt-cache depends mariadb-server | awk -F '-' '/Depends/ { print $NF }'
|
|
|
|
register: apt_mariadb_version
|
|
|
|
changed_when: false
|
|
|
|
|
|
|
|
- name: DEBCONF | Prepare MariaDB silent installation (root password)
|
|
|
|
debconf: name='mariadb-server-{{ apt_mariadb_version.stdout }}' question='mysql-server/root_password' vtype='password' value='{{ mysql_root_password }}'
|
|
|
|
when: not mysql_exists.stat.exists
|
|
|
|
|
2015-08-08 18:44:08 +07:00
|
|
|
- name: DEBCONF | Prepare MariaDB silent installation (root password again)
|
2015-07-13 17:32:49 +07:00
|
|
|
debconf: name='mariadb-server-{{ apt_mariadb_version.stdout }}' question='mysql-server/root_password_again' vtype='password' value='{{ mysql_root_password }}'
|
|
|
|
when: not mysql_exists.stat.exists
|
|
|
|
|
|
|
|
- name: APT | Install MariaDB server
|
2015-08-21 21:16:10 +07:00
|
|
|
apt: pkg=mariadb-server state=present
|
2015-07-13 17:32:49 +07:00
|
|
|
|
2016-09-23 16:40:35 +07:00
|
|
|
- name: APT | Install Galera
|
|
|
|
apt: pkg=galera-3 state=present
|
|
|
|
when: mysql_vendor == 'mariadb_galera'
|