Skip to content

Commit 2bada2d

Browse files
committed
Make sure tune_cpu gets started
In the past we could (and did) fail somewhere in the playbook which would result in not handling this notified handler. This also meant that we would not copy the file again on the next run, so didn't kick the handler and also didn't hit the handler on the next run. The disadvantage here is we might hit other handlers more often if next roles want to hit the same handler.
1 parent 215e2f2 commit 2bada2d

File tree

1 file changed

+4
-0
lines changed
  • provision-contest/ansible/roles/judgedaemon/tasks

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102
notify:
103103
- Enable and restart tune_cpu
104104

105+
- name: Enable and restart tune_cpu (flushing as this should always happen even if we fail further)
106+
# We need a daemon-reload, so we loose idempotency if we start the service in the next block
107+
ansible.builtin.meta: flush_handlers
108+
105109
- name: Copy judgedaemon related systemd unit files
106110
copy:
107111
remote_src: true

0 commit comments

Comments
 (0)