ansible-personal/roles/common/templates/sources.list.j2
Alan Orth 5f71991259
roles/common: Use httpredir.debian.org as default Debian mirror
Automatically uses the best mirror for your location, see:

    http://httpredir.debian.org/demo.html

Should be much better than any hardcoded default for most hosts.

Signed-off-by: Alan Orth <alan.orth@gmail.com>
2015-11-30 09:34:16 +02:00

31 lines
1.4 KiB
Django/Jinja

{% if ansible_distribution == 'Ubuntu' %}
{% set apt_mirror = apt_mirror | default("ubuntu.mirror.ac.ke") %}
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://{{ apt_mirror }}/ubuntu/ {{ ansible_distribution_release }} main restricted universe multiverse
###### Ubuntu Update Repos
deb http://{{ apt_mirror }}/ubuntu/ {{ ansible_distribution_release }}-security main restricted universe multiverse
deb http://{{ apt_mirror }}/ubuntu/ {{ ansible_distribution_release }}-updates main restricted universe multiverse
###### 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 %}
{% else %}
{% set apt_mirror = apt_mirror | default('httpredir.debian.org') %}
deb http://{{ apt_mirror }}/debian/ {{ ansible_distribution_release }} main contrib non-free
deb http://security.debian.org/ {{ ansible_distribution_release }}/updates main contrib non-free
deb http://{{ apt_mirror }}/debian/ {{ ansible_distribution_release }}-updates main contrib non-free
{% endif %} {# ansible_distribution #}