2017-08-28 09:20:50 +00:00
|
|
|
---
|
|
|
|
- name: Add repo file
|
|
|
|
template: src=mariadb_ubuntu.list.j2 dest=/etc/apt/sources.list.d/mariadb.list owner=root group=root mode=0644
|
|
|
|
register: mariadb_list
|
|
|
|
|
|
|
|
- name: Add repo key
|
|
|
|
apt_key: id=C74CD1D8 url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF1656F24C74CD1D8 state=present
|
|
|
|
register: mariadb_key
|
|
|
|
|
|
|
|
- name: Update apt cache
|
|
|
|
apt: update_cache=yes
|
|
|
|
when: mariadb_list.changed == True or mariadb_key.changed == True
|
|
|
|
|
|
|
|
- name: Unattended package installation
|
|
|
|
shell: export DEBIAN_FRONTEND=noninteractive
|
|
|
|
changed_when: false
|
|
|
|
|
|
|
|
- name: Install MariaDB
|
|
|
|
apt: pkg={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- mariadb-server
|
2018-06-09 08:48:20 +00:00
|
|
|
- mariadb-client
|
|
|
|
- libmariadbclient18
|
|
|
|
|
|
|
|
- name: Install MySQLdb Python package for secure installations.
|
2019-06-21 03:10:13 +00:00
|
|
|
apt: pkg=python3-mysqldb state=present
|
2018-06-09 08:48:20 +00:00
|
|
|
when: mysql_secure_installation and mysql_root_password is defined
|