2015-07-12 16:50:23 +07:00
|
|
|
---
|
|
|
|
|
2015-07-13 17:32:49 +07:00
|
|
|
- name: FAIL | If config asked is impossible
|
2016-09-25 17:47:36 +07:00
|
|
|
fail: msg="config asked is impossible ({{ mysql_origin }} / {{ mysql_vendor }})"
|
2015-07-13 17:32:49 +07:00
|
|
|
when: >
|
|
|
|
not (
|
|
|
|
(mysql_origin == 'default' and mysql_vendor == 'mysql') or
|
2016-09-23 14:38:19 +07:00
|
|
|
(mysql_origin == 'default' and mysql_vendor == 'mariadb') or
|
2015-07-16 15:56:28 +07:00
|
|
|
(mysql_origin == 'upstream' and mysql_vendor == 'mariadb') or
|
2016-09-23 16:40:35 +07:00
|
|
|
(mysql_origin == 'upstream' and mysql_vendor == 'mariadb_galera') or
|
2015-07-16 15:56:28 +07:00
|
|
|
(mysql_origin == 'upstream' and mysql_vendor == 'percona')
|
2015-07-13 17:32:49 +07:00
|
|
|
)
|
|
|
|
|
2017-06-01 20:56:08 +07:00
|
|
|
- name: INCLUDE | Use Percona repository
|
|
|
|
include: 'percona/apt.yml'
|
|
|
|
when: >
|
|
|
|
mysql_use_percona_apt and
|
|
|
|
not (mysql_origin == 'upstream' and mysql_vendor == 'percona')
|
|
|
|
|
2015-07-13 17:32:49 +07:00
|
|
|
- name: INCLUDE | Install MySQL from default repo
|
2015-08-21 16:24:37 +07:00
|
|
|
include: 'mysql/default.yml'
|
2015-07-12 17:47:44 +07:00
|
|
|
when: mysql_origin == 'default' and mysql_vendor == 'mysql'
|
2015-07-12 16:50:23 +07:00
|
|
|
|
|
|
|
- name: INCLUDE | Install MariaDB from Debian repo
|
2015-08-21 16:24:37 +07:00
|
|
|
include: 'mariadb/default.yml'
|
2016-09-23 14:38:19 +07:00
|
|
|
when: mysql_origin == 'default' and mysql_vendor == 'mariadb'
|
2015-07-12 16:50:23 +07:00
|
|
|
|
|
|
|
- name: INCLUDE | Install MariaDB from MariaDB repo
|
2015-08-21 16:24:37 +07:00
|
|
|
include: 'mariadb/upstream.yml'
|
2016-09-23 16:40:35 +07:00
|
|
|
when: mysql_origin == 'upstream' and (mysql_vendor == 'mariadb' or mysql_vendor == 'mariadb_galera')
|
2015-07-12 16:50:23 +07:00
|
|
|
|
|
|
|
- name: INCLUDE | Install Percona Server from Percona repo
|
2015-08-21 16:24:37 +07:00
|
|
|
include: 'percona/upstream.yml'
|
2015-07-16 15:56:28 +07:00
|
|
|
when: mysql_origin == 'upstream' and mysql_vendor == 'percona'
|
2015-07-12 16:50:23 +07:00
|
|
|
|
|
|
|
- name: APT | Install few MySQL related tools
|
2016-09-25 19:56:42 +07:00
|
|
|
apt: pkg={{ item }} state=present install_recommends=no
|
2017-06-28 21:15:44 +07:00
|
|
|
with_items: "{{ mysql_tools }}"
|
|
|
|
|
|
|
|
- name: APT | Install percona-xtrabackup if needed
|
|
|
|
apt: pkg={{ mysql_xtrabackup_package }}
|
|
|
|
when: mysql_install_xtrabackup_package
|