Skip to content

Commit 9333630

Browse files
Move ICPC image fixes to separate role.
1 parent 2ee86ec commit 9333630

File tree

8 files changed

+46
-30
lines changed

8 files changed

+46
-30
lines changed

icpc-wf/ansible/admin.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
roles:
1010
- role: base_packages
1111
tags: base_packages
12+
- role: icpc_fixes
13+
tags: icpc_fixes
14+
when: ICPC_IMAGE
1215
- role: system_fixes
1316
tags: system_fixes
1417
- role: hosts

icpc-wf/ansible/domserver.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
roles:
1010
- role: base_packages
1111
tags: base_packages
12+
- role: icpc_fixes
13+
tags: icpc_fixes
14+
when: ICPC_IMAGE
1215
- role: system_fixes
1316
tags: system_fixes
1417
- role: hosts

icpc-wf/ansible/group_vars/all/all.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ DOMSERVER_URL: "{{DOMSERVER}}"
1818
DOMSERVER_SSL_CERT: /etc/ssl/certs/domserver.crt
1919
DOMSERVER_SSL_KEY: /etc/ssl/private/domserver.key
2020

21+
# Set this to true when you are using the ICPC World Finals Contest Image
22+
ICPC_IMAGE: false
23+
2124
# Set this when on the blue network at the World Finals where no
2225
# internet access is available and "packages" must be used as APT repo
2326
# server.

icpc-wf/ansible/judgehost.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
roles:
1010
- role: base_packages
1111
tags: base_packages
12+
- role: icpc_fixes
13+
tags: icpc_fixes
14+
when: ICPC_IMAGE
1215
- role: system_fixes
1316
tags: system_fixes
1417
- role: hosts
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
# Define here handlers associated to this role.
3+
4+
- name: restart systemd timesyncd
5+
command: systemctl restart systemd-timesyncd
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
# These tasks perform fixes used on the ICPC image to the base system.
3+
4+
- name: add NTP servers
5+
lineinfile:
6+
dest: /etc/systemd/timesyncd.conf
7+
regexp: '^#?NTP='
8+
line: "NTP=10.3.3.208 10.3.3.209"
9+
notify: restart systemd timesyncd
10+
when: WF_RESTRICTED_NETWORK
11+
12+
- name: remove source line from interfaces
13+
lineinfile:
14+
dest: /etc/network/interfaces
15+
regexp: '^source-'
16+
state: absent
17+
18+
- name: Re-order PXEboot
19+
shell: efibootmgr -o {{ EFI_ORDER }}
20+
when: EFI_ORDER is defined
21+
22+
- name: disable mumble,selfie services
23+
service:
24+
name: "{{ item }}"
25+
state: stopped
26+
enabled: no
27+
with_items:
28+
- mumble-server
29+
- selfie
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
22
# Define here handlers associated to this role.
33

4-
- name: restart systemd timesyncd
5-
command: systemctl restart systemd-timesyncd
6-
74
- name: update dconf
85
shell: dconf update
Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
---
22
# These tasks perform miscellaneous fixes to the base system.
33

4-
- name: add NTP servers
5-
lineinfile:
6-
dest: /etc/systemd/timesyncd.conf
7-
regexp: '^#?NTP='
8-
line: "NTP=10.3.3.208 10.3.3.209"
9-
notify: restart systemd timesyncd
10-
when: WF_RESTRICTED_NETWORK
11-
12-
- name: remove source line from interfaces
13-
lineinfile:
14-
dest: /etc/network/interfaces
15-
regexp: '^source-'
16-
state: absent
17-
18-
- name: Re-order PXEboot
19-
shell: efibootmgr -o {{ EFI_ORDER }}
20-
when: EFI_ORDER is defined
21-
224
- name: set timezone
235
timezone:
246
name: "{{TIMEZONE}}"
@@ -46,12 +28,3 @@
4628
- name: Force enable alt-tab for switching windows
4729
copy: src=dconf/ dest=/etc/dconf/
4830
notify: update dconf
49-
50-
- name: disable mumble,selfie services
51-
service:
52-
name: "{{ item }}"
53-
state: stopped
54-
enabled: no
55-
with_items:
56-
- mumble-server
57-
- selfie

0 commit comments

Comments
 (0)