Skip to content

Commit 57eaf7e

Browse files
committed
Add option to deploy code only
1 parent d59b0fc commit 57eaf7e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

provision-contest/ansible/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ $(LIBVENDOR): $(LIBVENDORTGZ)
2727
-cd roles/domjudge_checkout/files && tar xzf $(notdir $<)
2828
endif
2929

30-
domserver judgehost admin grafana cds scoreboard mgmt: %: %.yml hosts group_vars/all/secret.yml $(LIBVENDOR) $(SSHKEY) $(SSHKEY).pub
30+
ROLES=domserver judgehost admin grafana cds scoreboard mgmt
31+
$(ROLES): %: %.yml hosts group_vars/all/secret.yml $(LIBVENDOR) $(SSHKEY) $(SSHKEY).pub
3132
ansible-playbook -i hosts $<
3233

34+
CODEONLY_ROLES=$(addprefix codeonly-,domserver judgehost admin)
35+
$(CODEONLY_ROLES): codeonly-%:
36+
ansible-playbook -i hosts --tags pretask,domjudge_build $*.yml
37+
3338
admin: $(SSL_LOCALHOST_FILES)
3439
grafana: $(SSL_GRAFANA_FILES)
3540
domserver: $(SSL_DOMSERVER_FILES)
@@ -61,4 +66,4 @@ distclean: clean
6166
rm -f $(SSL_CDS_FILES)
6267
rm -f $(SSL_GRAFANA_FILES)
6368

64-
.PHONY: default clean distclean domserver judgehost admin grafana cds scoreboard
69+
.PHONY: default clean distclean $(ROLES) $(CODEONLY_ROLES)

provision-contest/ansible/judgehost.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@
5454
get_mime: false
5555
register: service_file
5656
check_mode: no
57+
tags: pretask
5758

5859
- name: Disable all cores
5960
service:
6061
name: "domjudge-judgedaemon@{{ item }}"
6162
state: stopped
6263
with_sequence: start=0 end={{ ansible_processor_vcpus }} format=domjudge-judgedaemon@%1x
6364
when: service_file.stat.exists
65+
tags: pretask
6466
tasks:
6567
- name: Add autostart shortcuts
6668
template:

0 commit comments

Comments
 (0)