mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-02-24 10:13:30 +07:00
Full buster optim (#38)
* Remove Stretch and Percona support * Delete root password management (On Buster, it uses socket auth) * Fix sync backups files master -> slave * Cleanup legacy code on replication slave * Use modern configuration * Debian buster configuration style * Drop logrotate management (useless) * Add new default values in defaults/main.yml (according with MariaDB doc) * Travis with Ansible 2.8+ * Drop feature "don't replicate mysql database" * Fully compatible with python3
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
---
|
||||
|
||||
- name: INCLUDE | Setup Percona repository
|
||||
import_tasks: 'percona/apt.yml'
|
||||
when: mariadb_use_percona_apt | bool
|
||||
|
||||
- name: INCLUDE | Setup MariaDB repository
|
||||
import_tasks: 'mariadb/upstream.yml'
|
||||
when: mariadb_origin == 'upstream'
|
||||
@@ -15,8 +11,3 @@
|
||||
apt:
|
||||
pkg: "{{ mariadb_tools }}"
|
||||
install_recommends: no
|
||||
|
||||
- name: APT | Install percona-xtrabackup if needed
|
||||
apt:
|
||||
pkg: "{{ mariadb_xtrabackup_package }}"
|
||||
when: mariadb_install_xtrabackup_package | bool
|
||||
|
||||
@@ -1,26 +1,5 @@
|
||||
---
|
||||
|
||||
- name: SHELL | Get MariaDB target version
|
||||
shell: "LANG=C apt-cache depends mariadb-server | awk -F '-' '/Depends/ { print $NF }'"
|
||||
register: apt_mariadb_version
|
||||
changed_when: false
|
||||
|
||||
- name: DEBCONF | Prepare MariaDB silent installation (root password)
|
||||
debconf:
|
||||
name: 'mariadb-server-{{ apt_mariadb_version.stdout }}'
|
||||
question: 'mysql-server/root_password'
|
||||
vtype: 'password'
|
||||
value: '{{ mariadb_root_password }}'
|
||||
when: not mariadb_exists.stat.exists
|
||||
|
||||
- name: DEBCONF | Prepare MariaDB silent installation (root password again)
|
||||
debconf:
|
||||
name: 'mariadb-server-{{ apt_mariadb_version.stdout }}'
|
||||
question: 'mysql-server/root_password_again'
|
||||
vtype: 'password'
|
||||
value: '{{ mariadb_root_password }}'
|
||||
when: not mariadb_exists.stat.exists
|
||||
|
||||
- name: APT | Install MariaDB server
|
||||
apt:
|
||||
pkg: mariadb-server
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
|
||||
- name: APT | Install Percona repository
|
||||
apt:
|
||||
deb: https://repo.percona.com/apt/percona-release_latest.generic_all.deb
|
||||
|
||||
- name: COMMAND | Enable percona tools repository
|
||||
command: percona-release enable tools release
|
||||
args:
|
||||
creates: /etc/apt/sources.list.d/percona-tools-release.list
|
||||
register: p
|
||||
|
||||
- name: APT | Update cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: p.changed
|
||||
Reference in New Issue
Block a user