File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
provision-contest/ansible Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 42
42
tags : prometheus_target_all
43
43
when : GRAFANA_MONITORING
44
44
pre_tasks :
45
- - name : Get current services
46
- service_facts :
45
+ - name : Check if the service is already available
46
+ stat :
47
+ path :
/etc/systemd/system/[email protected]
48
+ get_attributes : false
49
+ get_checksum : false
50
+ get_mime : false
51
+ register : service_file
52
+
47
53
- name : Disable all cores
48
54
service :
49
- name= "domjudge-judgedaemon@{{ item }}"
50
- state= stopped
55
+ name : " domjudge-judgedaemon@{{ item }}"
56
+ state : stopped
51
57
with_sequence : start=0 end={{ ansible_processor_vcpus }} format=domjudge-judgedaemon@%1x
52
- when :
' "[email protected] " in services '
58
+ when : service_file.stat.exists
53
59
tasks :
54
60
- name : add autostart shortcuts
55
61
template :
You can’t perform that action at this time.
0 commit comments