ansible-mysql/tasks/install/main.yml

44 lines
1.4 KiB
YAML
Raw Normal View History

---
2015-07-13 17:32:49 +07:00
- name: FAIL | If config asked is impossible
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
(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
)
- 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
include: 'mysql/default.yml'
2015-07-12 17:47:44 +07:00
when: mysql_origin == 'default' and mysql_vendor == 'mysql'
- name: INCLUDE | Install MariaDB from Debian repo
include: 'mariadb/default.yml'
2016-09-23 14:38:19 +07:00
when: mysql_origin == 'default' and mysql_vendor == 'mariadb'
- name: INCLUDE | Install MariaDB from MariaDB repo
include: 'mariadb/upstream.yml'
when: mysql_origin == 'upstream' and (mysql_vendor == 'mariadb' or mysql_vendor == 'mariadb_galera')
- name: INCLUDE | Install Percona Server from Percona repo
include: 'percona/upstream.yml'
2015-07-16 15:56:28 +07:00
when: mysql_origin == 'upstream' and mysql_vendor == 'percona'
- name: APT | Install few MySQL related tools
apt: pkg={{ item }} state=present
with_items:
- mytop
- percona-toolkit
- python-mysqldb
2015-08-21 06:00:44 +07:00
- mysqltuner
- name: APT | Install Percona Xtrabackup
apt: pkg=percona-xtrabackup state=present