23 lines
1.0 KiB
YAML
23 lines
1.0 KiB
YAML
---
|
|
|
|
- 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: SHELL | 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: SHELL | Prepare MariaDB silent installation (root password again) // BUGGY?
|
|
debconf: name='mysql-server-' 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
|
|
|