Kaynağa Gözat

Choosing the closest ubuntu mirror before anything else

Aleksandr Bogdanov 10 yıl önce
ebeveyn
işleme
a849948e8d

+ 3
- 0
roles/common/tasks/main.yml Dosyayı Görüntüle

@@ -1,5 +1,8 @@
1 1
 ---
2 2
 # Defines tasks applicable across all machines in the infrastructure.
3
+- name: Set up closest mirror autoselect (ubuntu-only)
4
+  template: src=apt_sources.list.j2 dest=/etc/apt/sources.list
5
+  when: ansible_distribution == 'Ubuntu'
3 6
 
4 7
 - name: Update apt cache
5 8
   apt: update_cache=yes

+ 5
- 0
roles/common/templates/apt_sources.list.j2 Dosyayı Görüntüle

@@ -0,0 +1,5 @@
1
+# This file is generated by Sovereign
2
+deb mirror://mirrors.ubuntu.com/mirrors.txt {{ ansible_distribution_release }} main restricted universe multiverse
3
+deb mirror://mirrors.ubuntu.com/mirrors.txt {{ ansible_distribution_release }}-updates main restricted universe multiverse
4
+deb mirror://mirrors.ubuntu.com/mirrors.txt {{ ansible_distribution_release }}-backports main restricted universe multiverse
5
+deb mirror://mirrors.ubuntu.com/mirrors.txt {{ ansible_distribution_release }}-security main restricted universe multiverse

Loading…
İptal
Kaydet