diff --git a/roles/mariadb/tasks/main.yml b/roles/mariadb/tasks/main.yml index f2324e3..468a298 100644 --- a/roles/mariadb/tasks/main.yml +++ b/roles/mariadb/tasks/main.yml @@ -4,7 +4,7 @@ tags: mariadb - name: Add MariaDB 10.1 repo - apt_repository: repo="deb http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.1/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} main" state=present + template: src=mariadb.list.j2 dest=/etc/apt/sources.list.d/mariadb.list owner=root group=root mode=0644 tags: mariadb - name: Install mariadb-server diff --git a/roles/mariadb/templates/mariadb.list.j2 b/roles/mariadb/templates/mariadb.list.j2 new file mode 100644 index 0000000..ff71b8c --- /dev/null +++ b/roles/mariadb/templates/mariadb.list.j2 @@ -0,0 +1,10 @@ +{% if ansible_distribution == 'Ubuntu' and ansible_distribution_version == '16.04' %} + +# there are no xenial builds yet, so use wily +deb [arch=amd64,i386] http://mariadb.mirror.serveriai.lt/repo/10.1/ubuntu wily main + +{% elif ansible_distribution == 'Debian' %} + +deb [arch=amd64,i386] http://mariadb.mirror.serveriai.lt/repo/10.1/debian {{ ansible_distribution_release }} main + +{% endif %} {# ansible_distribution #}