mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-02-24 10:13:30 +07:00
Drop MySQL, Percona Server and Jessie support
This commit is contained in:
@@ -1,25 +1,8 @@
|
||||
---
|
||||
|
||||
- name: FAIL | If config asked is impossible
|
||||
fail: msg="config asked is impossible ({{ mysql_origin }} / {{ mysql_vendor }})"
|
||||
when: >
|
||||
not (
|
||||
(mysql_origin == 'default' and mysql_vendor == 'mysql') or
|
||||
(mysql_origin == 'default' and mysql_vendor == 'mariadb') or
|
||||
(mysql_origin == 'upstream' and mysql_vendor == 'mariadb') or
|
||||
(mysql_origin == 'upstream' and mysql_vendor == 'mariadb_galera') or
|
||||
(mysql_origin == 'upstream' and mysql_vendor == 'percona')
|
||||
)
|
||||
|
||||
- name: INCLUDE | Use Percona repository
|
||||
include: 'percona/apt.yml'
|
||||
when: >
|
||||
mysql_use_percona_apt and
|
||||
not (mysql_origin == 'upstream' and mysql_vendor == 'percona')
|
||||
|
||||
- name: INCLUDE | Install MySQL from default repo
|
||||
include: 'mysql/default.yml'
|
||||
when: mysql_origin == 'default' and mysql_vendor == 'mysql'
|
||||
when: mysql_use_percona_apt
|
||||
|
||||
- name: INCLUDE | Install MariaDB from Debian repo
|
||||
include: 'mariadb/default.yml'
|
||||
@@ -27,16 +10,15 @@
|
||||
|
||||
- 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'
|
||||
when: mysql_origin == 'upstream' and mysql_vendor == 'percona'
|
||||
when: mysql_origin == 'upstream'
|
||||
|
||||
- name: APT | Install few MySQL related tools
|
||||
apt: pkg={{ item }} state=present install_recommends=no
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
install_recommends: no
|
||||
with_items: "{{ mysql_tools }}"
|
||||
|
||||
- name: APT | Install percona-xtrabackup if needed
|
||||
apt: pkg={{ mysql_xtrabackup_package }}
|
||||
apt:
|
||||
pkg: "{{ mysql_xtrabackup_package }}"
|
||||
when: mysql_install_xtrabackup_package
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
|
||||
- name: SHELL | Get MySQL target version
|
||||
shell: LANG=C apt-cache depends mysql-server | awk -F '-' '/Depends/ { print $NF }'
|
||||
register: apt_mysql_version
|
||||
changed_when: false
|
||||
|
||||
- name: DEBCONF | Prepare MySQL silent installation (root password)
|
||||
debconf: name='mysql-server-{{ apt_mysql_version.stdout }}' question='mysql-server/root_password' vtype='password' value='{{ mysql_root_password }}'
|
||||
when: not mysql_exists.stat.exists
|
||||
|
||||
- name: DEBCONF | Prepare MySQL silent installation (root password again)
|
||||
debconf: name='mysql-server-{{ apt_mysql_version.stdout }}' question='mysql-server/root_password_again' vtype='password' value='{{ mysql_root_password }}'
|
||||
when: not mysql_exists.stat.exists
|
||||
|
||||
- name: APT | Install MySQL server
|
||||
apt: pkg=mysql-server state=present
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
|
||||
- name: INCLUDE | Add percona APT repository
|
||||
include: apt.yml
|
||||
|
||||
- name: DEBCONF | Prepare MySQL silent installation (root password)
|
||||
debconf: name='percona-server-server-{{ mysql_percona_version }}' question='percona-server-server/root_password' vtype='password' value='{{ mysql_root_password }}'
|
||||
when: not mysql_exists.stat.exists
|
||||
|
||||
- name: DEBCONF | Prepare MySQL silent installation (root password)
|
||||
debconf: name='percona-server-server-{{ mysql_percona_version }}' question='percona-server-server/root_password_again' vtype='password' value='{{ mysql_root_password }}'
|
||||
when: not mysql_exists.stat.exists
|
||||
|
||||
- name: APT | Install Percona
|
||||
apt: update_cache=yes cache_valid_time=3600 pkg='percona-server-server-{{ mysql_percona_version }}' state=present
|
||||
|
||||
Reference in New Issue
Block a user