From 9aaad366f5051eef407a31e2c25357831cfa279b Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 1 Jun 2015 14:01:56 +0300 Subject: [PATCH] roles/common: Only add extras repo on Ubuntu 14.04 The Extras repo was discontinued after 14.10 (but the latest we deploy is 14.04). See: https://lists.ubuntu.com/archives/technical-board/2015-January/002063.html Signed-off-by: Alan Orth --- roles/common/tasks/packages_Ubuntu.yml | 1 + roles/common/templates/sources.list.j2 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/roles/common/tasks/packages_Ubuntu.yml b/roles/common/tasks/packages_Ubuntu.yml index 2b72f69..c2a3675 100644 --- a/roles/common/tasks/packages_Ubuntu.yml +++ b/roles/common/tasks/packages_Ubuntu.yml @@ -4,6 +4,7 @@ - name: Add GPG key for Extras repo apt_key: id=0x3E5C1192 url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x16126D3A3E5C1192 state=present + when: ansible_distribution_version == '14.04' - name: Upgrade base OS apt: upgrade=dist update_cache=yes diff --git a/roles/common/templates/sources.list.j2 b/roles/common/templates/sources.list.j2 index ad4f8b7..3798fca 100644 --- a/roles/common/templates/sources.list.j2 +++ b/roles/common/templates/sources.list.j2 @@ -14,5 +14,8 @@ deb http://{{ apt_mirror }}/ubuntu/ {{ ansible_distribution_release }}-updates m ###### Ubuntu Partner Repo deb http://archive.canonical.com/ubuntu {{ ansible_distribution_release }} partner +{% if ansible_distribution_version == '14.04' %} +{# extras repo was discontinued after 14.10, but the latest we deploy is 14.04 #} ###### Ubuntu Extras Repo deb http://extras.ubuntu.com/ubuntu {{ ansible_distribution_release }} main +{% endif %}