2015-07-13 17:32:49 +07:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: SHELL | Get MariaDB target version
|
2018-03-18 00:28:56 +07:00
|
|
|
shell: "LANG=C apt-cache depends mariadb-server | awk -F '-' '/Depends/ { print $NF }'"
|
2015-07-13 17:32:49 +07:00
|
|
|
register: apt_mariadb_version
|
|
|
|
changed_when: false
|
|
|
|
|
|
|
|
- name: DEBCONF | Prepare MariaDB silent installation (root password)
|
2018-03-18 00:28:56 +07:00
|
|
|
debconf:
|
|
|
|
name: 'mariadb-server-{{ apt_mariadb_version.stdout }}'
|
|
|
|
question: 'mysql-server/root_password'
|
|
|
|
vtype: 'password'
|
|
|
|
value: '{{ mariadb_root_password }}'
|
2018-03-17 23:28:54 +07:00
|
|
|
when: not mariadb_exists.stat.exists
|
2015-07-13 17:32:49 +07:00
|
|
|
|
2015-08-08 18:44:08 +07:00
|
|
|
- name: DEBCONF | Prepare MariaDB silent installation (root password again)
|
2018-03-18 00:28:56 +07:00
|
|
|
debconf:
|
|
|
|
name: 'mariadb-server-{{ apt_mariadb_version.stdout }}'
|
|
|
|
question: 'mysql-server/root_password_again'
|
|
|
|
vtype: 'password'
|
|
|
|
value: '{{ mariadb_root_password }}'
|
2018-03-17 23:28:54 +07:00
|
|
|
when: not mariadb_exists.stat.exists
|
2015-07-13 17:32:49 +07:00
|
|
|
|
|
|
|
- name: APT | Install MariaDB server
|
2018-03-18 00:28:56 +07:00
|
|
|
apt:
|
|
|
|
pkg: mariadb-server
|
2015-07-13 17:32:49 +07:00
|
|
|
|
2016-09-23 16:40:35 +07:00
|
|
|
- name: APT | Install Galera
|
2018-03-18 00:28:56 +07:00
|
|
|
apt:
|
|
|
|
pkg: galera-3
|
2019-04-16 18:55:38 +07:00
|
|
|
when: mariadb_use_galera
|