Skip to content

Commit b563864

Browse files
committed
Split tasks for when a graphical desktop is installed as this needs more customizations
1 parent a1a1de8 commit b563864

File tree

4 files changed

+32
-23
lines changed

4 files changed

+32
-23
lines changed

provision-contest/ansible/group_vars/all/all.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ DOMSERVER_SSL_KEY: /etc/ssl/private/domserver.key
2121
# Set this to true when you are using the ICPC World Finals Contest Image
2222
ICPC_IMAGE: false
2323

24+
# Set this to true when you are using a graphical desktop
25+
GRAPHICAL: false
26+
2427
# Set this when on the blue network at the World Finals where no
2528
# internet access is available and "packages" must be used as APT repo
2629
# server.
@@ -60,3 +63,4 @@ STATIC_SCOREBOARD_HOSTNAME: scoreboard
6063

6164
STATIC_SCOREBOARD_SSL_CERT: /etc/ssl/certs/scoreboard.crt
6265
STATIC_SCOREBOARD_SSL_KEY: /etc/ssl/private/scoreboard.key
66+

provision-contest/ansible/judgehost.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
mode: 0755
7070
loop:
7171
- rotate
72+
when: GRAPHICAL
7273

7374
- name: add autostart shortcuts from template
7475
template:
@@ -79,3 +80,4 @@
7980
mode: 0755
8081
loop:
8182
- taillog
83+
when: GRAPHICAL

provision-contest/ansible/roles/domjudge_user/tasks/main.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,28 @@
3838
group: domjudge
3939
mode: 0644
4040

41-
- name: enable GDM autologin
42-
lineinfile:
43-
path: /etc/gdm3/custom.conf
44-
regexp: 'AutomaticLoginEnable'
45-
line: 'AutomaticLoginEnable=true'
46-
create: true
47-
mode: 0644
48-
notify: restart gdm
49-
50-
- name: Automatically login domjudge user
51-
lineinfile:
52-
path: /etc/gdm3/custom.conf
53-
regexp: 'AutomaticLogin='
54-
line: 'AutomaticLogin=domjudge'
55-
notify: restart gdm
56-
57-
- name: make sure autostart directory exists
58-
file:
59-
dest: /home/domjudge/.config/autostart
60-
state: directory
61-
owner: domjudge
62-
group: domjudge
63-
mode: 0755
41+
- block:
42+
- name: enable GDM autologin
43+
lineinfile:
44+
path: /etc/gdm3/custom.conf
45+
regexp: 'AutomaticLoginEnable'
46+
line: 'AutomaticLoginEnable=true'
47+
create: true
48+
mode: 0644
49+
notify: restart gdm
50+
51+
- name: Automatically login domjudge user
52+
lineinfile:
53+
path: /etc/gdm3/custom.conf
54+
regexp: 'AutomaticLogin='
55+
line: 'AutomaticLogin=domjudge'
56+
notify: restart gdm
57+
58+
- name: make sure autostart directory exists
59+
file:
60+
dest: /home/domjudge/.config/autostart
61+
state: directory
62+
owner: domjudge
63+
group: domjudge
64+
mode: 0755
65+
when: GRAPHICAL

provision-contest/ansible/roles/system_fixes/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@
3333
group: root
3434
mode: 0755
3535
notify: update dconf
36+
when: GRAPHICAL

0 commit comments

Comments
 (0)