File tree Expand file tree Collapse file tree 8 files changed +39
-22
lines changed
Expand file tree Collapse file tree 8 files changed +39
-22
lines changed Original file line number Diff line number Diff line change 5757 dest : " {{ wrapper_desktop_file_path }}/jmucs_config.desktop"
5858 mode : " 0755"
5959
60+ - name : Set Ubuntu mirrors
61+ template :
62+ src : ubuntu-mirrors.j2
63+ dest : " {{ mirror_file_path.ubuntu }}"
64+ mode : " 0644"
65+ owner : root
66+ group : root
67+
6068- include_tasks : ubuntu_only.yml
6169 when : " ansible_distribution == 'Ubuntu'"
6270- include_tasks : mint_only.yml
6674 update_cache : yes
6775 register : apt_update
6876 retries : 100
69- failed_when : apt_update.failed and 'Unable to connect to' not in apt_update.stderr
7077 until : apt_update is success or ('Failed to lock apt for exclusive operation' not in apt_update.msg and '/var/lib/dpkg/lock' not in apt_update.msg)
Original file line number Diff line number Diff line change 1717 group : root
1818
1919- name : Set Linux Mint mirrors
20+ template :
21+ src : mint-mirrors.j2
22+ dest : " {{ mirror_file_path.mint }}"
23+ owner : root
24+ group : root
25+ mode : " 0644"
26+ when : " ansible_architecture == 'x86_64'"
27+ - name : Set Linux Mint sources
2028 template :
2129 src : mint.j2
2230 dest : /etc/apt/sources.list.d/official-package-repositories.list
Original file line number Diff line number Diff line change 11---
22# tasks file for Ubuntu
33
4- - name : Set Ubuntu mirrors
4+ - name : Set Ubuntu sources
55 template :
66 src : ubuntu.j2
77 dest : /etc/apt/sources.list
Original file line number Diff line number Diff line change 1+ {% for mirror in mint_mirrors %}
2+ {{ mirror }}
3+ {% endfor %}
Original file line number Diff line number Diff line change 44# Place modifications in another file in /etc/apt/sources.list.d/ with a .list
55# file extension.
66
7- {% for mirror in ubuntu_mirrors %}
8- # Upstream Ubuntu sources for {{ mirror }}
9- deb {{ mirror }} {{ ubuntu_release }} main restricted universe multiverse
10- deb {{ mirror }} {{ ubuntu_release }}-updates main restricted universe multiverse
11- deb {{ mirror }} {{ ubuntu_release }}-backports main restricted universe multiverse
12- deb {{ mirror }} {{ ubuntu_release }}-security main restricted universe multiverse
7+ # Ubuntu sources
8+ deb mirror+file://{{ mirror_file_path.ubuntu }} {{ ubuntu_release }} main restricted universe multiverse
9+ deb mirror+file://{{ mirror_file_path.ubuntu }} {{ ubuntu_release }}-updates main restricted universe multiverse
10+ deb mirror+file://{{ mirror_file_path.ubuntu }} {{ ubuntu_release }}-backports main restricted universe multiverse
11+ deb mirror+file://{{ mirror_file_path.ubuntu }} {{ ubuntu_release }}-security main restricted universe multiverse
1312
14- {% endfor %}
15-
16- {% for mirror in mint_mirrors %}
17- # Mint sources for {{ mirror }}
18- deb {{ mirror }} {{ ansible_distribution_release }} main upstream import backport
19-
20- {% endfor %}
13+ # Mint sources
14+ deb mirror+file://{{ mirror_file_path.mint }} {{ ansible_distribution_release }} main upstream import backport
2115
2216# Parter repository (necessary for optional media codecs) -- not mirrored
2317deb http://archive.canonical.com/ubuntu {{ ubuntu_release }} partner
Original file line number Diff line number Diff line change 1+ {% for mirror in ubuntu_mirrors %}
2+ {{ mirror }}
3+ {% endfor %}
Original file line number Diff line number Diff line change 44# Place modifications in another file in /etc/apt/sources.list.d/ with a .list
55# file extension.
66
7- {% for mirror in ubuntu_mirrors %}
8- deb {{ mirror }} {{ ubuntu_release }} main restricted universe multiverse
9- deb {{ mirror }} {{ ubuntu_release }}-updates main restricted universe multiverse
10- deb {{ mirror }} {{ ubuntu_release }}-backports main restricted universe multiverse
11- deb {{ mirror }} {{ ubuntu_release }}-security main restricted universe multiverse
12-
13- {% endfor %}
7+ # Ubuntu sources
8+ deb mirror+file://{{ mirror_file_path.ubuntu }} {{ ubuntu_release }} main restricted universe multiverse
9+ deb mirror+file://{{ mirror_file_path.ubuntu }} {{ ubuntu_release }}-updates main restricted universe multiverse
10+ deb mirror+file://{{ mirror_file_path.ubuntu }} {{ ubuntu_release }}-backports main restricted universe multiverse
11+ deb mirror+file://{{ mirror_file_path.ubuntu }} {{ ubuntu_release }}-security main restricted universe multiverse
1412
1513# Parter repository (necessary for optional media codecs) -- not mirrored
1614deb http://archive.canonical.com/ubuntu {{ ubuntu_release }} partner
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ mint_mirrors:
88 - " https://mirror.cs.jmu.edu/pub/linuxmint/packages"
99 - " http://packages.linuxmint.com"
1010
11+ mirror_file_path :
12+ mint : /etc/apt/mint-mirrors.txt
13+ ubuntu : /etc/apt/ubuntu-mirrors.txt
14+
1115global_base_path : " /opt"
1216global_profile_path : " {{ global_base_path }}/csvmprofile"
1317
You can’t perform that action at this time.
0 commit comments