mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-02-24 10:13:30 +07:00
Role organization:
Delete useless files percona-xtrbackup is optional on Wheezy (unless you use percona apt) better organization in mysql vendors
This commit is contained in:
18
tasks/install/mariadb/default.yml
Normal file
18
tasks/install/mariadb/default.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
|
||||
- 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='{{ mysql_root_password }}'
|
||||
when: not mysql_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='{{ mysql_root_password }}'
|
||||
when: not mysql_exists.stat.exists
|
||||
|
||||
- name: APT | Install MariaDB server
|
||||
apt: pkg=mariadb-server state=latest
|
||||
|
||||
14
tasks/install/mariadb/upstream.yml
Normal file
14
tasks/install/mariadb/upstream.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
|
||||
- name: APT | Install MariaDB key
|
||||
apt_key: keyserver="keyserver.ubuntu.com" id="0xcbcb082a1bb943db" state=present
|
||||
|
||||
- name: APT | Add MariaDB repository
|
||||
apt_repository: repo='deb {{ mariadb_repository }} {{ ansible_distribution_release }} main' state=present
|
||||
|
||||
- name: APT | Add MariaDB (src) repository
|
||||
apt_repository: repo='deb-src {{ mariadb_repository }} {{ ansible_distribution_release }} main' state=present
|
||||
|
||||
- name: INCLUDE | Normal Install
|
||||
include: default.yml
|
||||
|
||||
Reference in New Issue
Block a user