Skip to content

Commit 2bf48c2

Browse files
committed
Check if the service exists
1 parent f98123a commit 2bf48c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

icpc-wf/ansible/judgehost.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@
4141
tags: prometheus_target_all
4242
when: GRAFANA_MONITORING
4343
pre_tasks:
44+
- name: Get current services
45+
service_facts:
4446
- name: Disable all cores
4547
service:
4648
name="domjudge-judgedaemon@{{item}}"
4749
state=stopped
4850
with_sequence: start=0 end={{ ansible_processor_vcpus }} format=domjudge-judgedaemon@%1x
51+
when: domjudge-judgedaemon@%1x in services
4952
tasks:
5053
- name: add autostart shortcuts
5154
template:

0 commit comments

Comments
 (0)