roles/mariadb: Use MariaDB 10.2 from vendor repo

I can't remember right now why I needed to use Debian's MariaDB build
but now I just want to use upstream's latest stable. Debian's version
is 10.1 and upstream has moved on to 10.2.
This commit is contained in:
Alan Orth 2017-09-26 15:15:27 +03:00
parent ff6253213a
commit a38e2a4ff6
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 3 additions and 12 deletions

View File

@ -1,18 +1,9 @@
--- ---
- name: Add GPG key for MariaDB repo - name: Add GPG key for MariaDB repo
when: ansible_distribution_major_version | version_compare('9', '!=')
apt_key: id=0x177F4010FE56CA3336300305F1656F24C74CD1D8 url=https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x177F4010FE56CA3336300305F1656F24C74CD1D8 apt_key: id=0x177F4010FE56CA3336300305F1656F24C74CD1D8 url=https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x177F4010FE56CA3336300305F1656F24C74CD1D8
tags: mariadb, packages tags: mariadb, packages
- name: Remove old repo file - name: Add MariaDB 10.2 repo
file: path={{ item }} state=absent
with_items:
- /etc/apt/sources.list.d/sgp1_mirrors_digitalocean_com_mariadb_repo_10_1_debian.list
- /etc/apt/sources.list.d/sgp1_mirrors_digitalocean_com_mariadb_repo_10_1_ubuntu.list
tags: mariadb, packages
- name: Add MariaDB 10.1 repo
when: ansible_distribution_major_version | version_compare('9', '!=')
template: src=mariadb.list.j2 dest=/etc/apt/sources.list.d/mariadb.list owner=root group=root mode=0644 template: src=mariadb.list.j2 dest=/etc/apt/sources.list.d/mariadb.list owner=root group=root mode=0644
tags: mariadb, packages tags: mariadb, packages

View File

@ -1,10 +1,10 @@
# {{ ansible_managed }} # {{ ansible_managed }}
{% if ansible_distribution == 'Ubuntu' %} {% if ansible_distribution == 'Ubuntu' %}
deb [arch=amd64,i386] http://mariadb.mirror.serveriai.lt/repo/10.1/ubuntu {{ ansible_distribution_release }} main deb [arch=amd64,i386] http://mariadb.mirror.serveriai.lt/repo/10.2/ubuntu {{ ansible_distribution_release }} main
{% elif ansible_distribution == 'Debian' %} {% elif ansible_distribution == 'Debian' %}
deb [arch=amd64,i386] http://mariadb.mirror.serveriai.lt/repo/10.1/debian {{ ansible_distribution_release }} main deb [arch=amd64,i386] http://mariadb.mirror.serveriai.lt/repo/10.2/debian {{ ansible_distribution_release }} main
{% endif %} {# ansible_distribution #} {% endif %} {# ansible_distribution #}