ansible-mysql/tasks/install/main.yml

44 lines
1.5 KiB
YAML
Raw Normal View History

---
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
(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: 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
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 install_recommends=no
with_items:
- mytop
- percona-toolkit
2016-09-25 19:28:10 +07:00
- percona-xtrabackup
- python-mysqldb
2015-08-21 06:00:44 +07:00
- mysqltuner