From a38e2a4ff66e68a1e57a32b24cf4728eebac8f58 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 26 Sep 2017 15:15:27 +0300 Subject: [PATCH] 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. --- roles/mariadb/tasks/main.yml | 11 +---------- roles/mariadb/templates/mariadb.list.j2 | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/roles/mariadb/tasks/main.yml b/roles/mariadb/tasks/main.yml index 6db4957..34ecc0d 100644 --- a/roles/mariadb/tasks/main.yml +++ b/roles/mariadb/tasks/main.yml @@ -1,18 +1,9 @@ --- - 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 tags: mariadb, packages -- name: Remove old repo file - 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', '!=') +- name: Add MariaDB 10.2 repo template: src=mariadb.list.j2 dest=/etc/apt/sources.list.d/mariadb.list owner=root group=root mode=0644 tags: mariadb, packages diff --git a/roles/mariadb/templates/mariadb.list.j2 b/roles/mariadb/templates/mariadb.list.j2 index 7ae37c7..1343fff 100644 --- a/roles/mariadb/templates/mariadb.list.j2 +++ b/roles/mariadb/templates/mariadb.list.j2 @@ -1,10 +1,10 @@ # {{ ansible_managed }} {% 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' %} -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 #}