File tree 8 files changed +39
-22
lines changed
8 files changed +39
-22
lines changed Original file line number Diff line number Diff line change 57
57
dest : " {{ wrapper_desktop_file_path }}/jmucs_config.desktop"
58
58
mode : " 0755"
59
59
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
+
60
68
- include_tasks : ubuntu_only.yml
61
69
when : " ansible_distribution == 'Ubuntu'"
62
70
- include_tasks : mint_only.yml
66
74
update_cache : yes
67
75
register : apt_update
68
76
retries : 100
69
- failed_when : apt_update.failed and 'Unable to connect to' not in apt_update.stderr
70
77
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 17
17
group : root
18
18
19
19
- 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
20
28
template :
21
29
src : mint.j2
22
30
dest : /etc/apt/sources.list.d/official-package-repositories.list
Original file line number Diff line number Diff line change 1
1
---
2
2
# tasks file for Ubuntu
3
3
4
- - name : Set Ubuntu mirrors
4
+ - name : Set Ubuntu sources
5
5
template :
6
6
src : ubuntu.j2
7
7
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 4
4
# Place modifications in another file in /etc/apt/sources.list.d/ with a .list
5
5
# file extension.
6
6
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
13
12
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
21
15
22
16
# Parter repository (necessary for optional media codecs) -- not mirrored
23
17
deb 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 4
4
# Place modifications in another file in /etc/apt/sources.list.d/ with a .list
5
5
# file extension.
6
6
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
14
12
15
13
# Parter repository (necessary for optional media codecs) -- not mirrored
16
14
deb http://archive.canonical.com/ubuntu {{ ubuntu_release }} partner
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ mint_mirrors:
8
8
- " https://mirror.cs.jmu.edu/pub/linuxmint/packages"
9
9
- " http://packages.linuxmint.com"
10
10
11
+ mirror_file_path :
12
+ mint : /etc/apt/mint-mirrors.txt
13
+ ubuntu : /etc/apt/ubuntu-mirrors.txt
14
+
11
15
global_base_path : " /opt"
12
16
global_profile_path : " {{ global_base_path }}/csvmprofile"
13
17
You can’t perform that action at this time.
0 commit comments