2015-07-12 16:50:23 +07:00
|
|
|
---
|
|
|
|
|
2015-07-13 17:32:49 +07:00
|
|
|
- name: FAIL | If config asked is impossible
|
2015-08-21 16:24:37 +07:00
|
|
|
fail: msg="config asked is impossible"
|
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
|
|
|
)
|
|
|
|
|
2015-08-21 16:24:37 +07:00
|
|
|
- name: APT | Install Percona Xtrabackup
|
|
|
|
include: percona/apt.yml
|
|
|
|
when: mysql_use_percona_repository
|
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
|
2015-08-21 21:16:10 +07:00
|
|
|
apt: pkg={{ item }} state=present
|
2015-07-12 16:50:23 +07:00
|
|
|
with_items:
|
|
|
|
- mytop
|
|
|
|
- percona-toolkit
|
|
|
|
- python-mysqldb
|
2015-08-21 06:00:44 +07:00
|
|
|
- mysqltuner
|
2015-07-12 16:50:23 +07:00
|
|
|
|
2015-08-21 16:24:37 +07:00
|
|
|
- name: APT | Install Percona Xtrabackup
|
|
|
|
apt: pkg=percona-xtrabackup state=present
|