File tree Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test contest deployment (ansible scripts)
2
+
3
+ on : [push,pull_request]
4
+
5
+ jobs :
6
+ test_domjudge_role :
7
+ strategy :
8
+ # matrix:
9
+ # os: [ubuntu-latest, ubuntu-20.04]
10
+ # role: [domserver,judgehost]
11
+ matrix :
12
+ os : [ubuntu-latest]
13
+ role : [domserver]
14
+ runs-on : ${{ matrix.os }}
15
+ steps :
16
+ - name : Checkout repo
17
+ uses : actions/checkout@v2
18
+ - name : Install ansible lint tools
19
+ run : sudo apt update; sudo apt install ansible
20
+ - name : Setup the hosts file
21
+ working-directory : ./icpc-wf/ansible
22
+ run : sed -i 's/\[${{ matrix.role }}\]/[removed]/g' hosts; printf '\n[${{ matrix.role }}]\ngithub-action\tansible_host=localhost ansible_connection=local' >> hosts
23
+ - name : Generate insecure credentials
24
+ working-directory : ./icpc-wf/ansible
25
+ run : mv group_vars/all/secret.yml{.example,}
26
+ - name : Run the default deployment method
27
+ working-directory : ./icpc-wf/ansible
28
+ run : make ${{ matrix.role }}
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ DOMSERVER_URL: "{{DOMSERVER}}"
18
18
DOMSERVER_SSL_CERT : /etc/ssl/certs/domserver.crt
19
19
DOMSERVER_SSL_KEY : /etc/ssl/private/domserver.key
20
20
21
+ # Set this to true when you are using an image with a graphical desktop
22
+ GRAPHICAL : false
23
+
21
24
# Set this to true when you are using the ICPC World Finals Contest Image
22
25
ICPC_IMAGE : false
23
26
Original file line number Diff line number Diff line change 41
41
tags : prometheus_target_all
42
42
when : GRAFANA_MONITORING
43
43
pre_tasks :
44
+ - name : Get current services
45
+ service_facts :
44
46
- name : Disable all cores
45
47
service :
46
48
name="domjudge-judgedaemon@{{item}}"
47
49
state=stopped
48
50
with_sequence : start=0 end={{ ansible_processor_vcpus }} format=domjudge-judgedaemon@%1x
51
+ when :
' "[email protected] " in services'
49
52
tasks :
50
53
- name : add autostart shortcuts
51
54
template :
Original file line number Diff line number Diff line change 43
43
line : ' AutomaticLoginEnable=true'
44
44
create : yes
45
45
notify : restart gdm
46
+ when : GRAPHICAL
46
47
47
48
- name : Automatically login domjudge user
48
49
lineinfile :
49
50
path : /etc/gdm3/custom.conf
50
51
regexp : ' AutomaticLogin='
51
52
line : ' AutomaticLogin=domjudge'
52
53
notify : restart gdm
54
+ when : GRAPHICAL
53
55
54
56
- name : make sure autostart directory exists
55
57
file : dest=/home/domjudge/.config/autostart state=directory owner=domjudge group=domjudge
Original file line number Diff line number Diff line change 28
28
- name : Force enable alt-tab for switching windows
29
29
copy : src=dconf/ dest=/etc/dconf/
30
30
notify : update dconf
31
+ when : GRAPHICAL
You can’t perform that action at this time.
0 commit comments