2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00
bench/playbooks/prerequisites/roles/mariadb/tasks/ubuntu.yml
2018-01-10 03:24:55 +05:30

32 lines
1.0 KiB
YAML

---
- 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=1BB943DB url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xCBCB082A1BB943DB state=present
register: mariadb_key
when: ansible_distribution_version | version_compare('16.04', 'lt')
- name: Add apt key for mariadb for Ubuntu >= 16.04
apt_key: id=C74CD1D8 url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF1656F24C74CD1D8 state=present
register: mariadb_key
when: ansible_distribution_version | version_compare('16.04', 'ge')
- 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
- mariadb-client
- mariadb-common
- libmariadbclient18
- python-mysqldb