ansible-mysql/tasks/install/default_mariadb.yml

19 lines
806 B
YAML
Raw Normal View History

2015-07-13 17:32:49 +07:00
---
- 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
2015-08-08 18:44:08 +07:00
- name: DEBCONF | Prepare MariaDB silent installation (root password again)
2015-07-13 17:32:49 +07:00
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