mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-04-09 13:42:10 +07:00
Delete root password management
On Buster, it uses socket auth.
This commit is contained in:
@@ -1,29 +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
|
||||
|
||||
- block:
|
||||
|
||||
- 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 and mariadb_root_password is string
|
||||
|
||||
- name: APT | Install MariaDB server
|
||||
apt:
|
||||
pkg: mariadb-server
|
||||
|
||||
Reference in New Issue
Block a user