I have an inventory containing a few dozens hosts.

I have a short playbook that configures a monitoring service on a single 
server. I build the contents of a per host config for the monitoring 
service and then I upload it to the monitoring service and restart the 
service in order for it to read the new config. This means that all tasks 
run against each host (as normal) except the last two that are delegated to 
the monitoring server (upload and restart). 

The issue is that systemd complains if there are too many restarts. I have 
managed to solve this by raising the number of permitted restarts per 
second in systemd. But, still, restarts may run too fast that systemd will 
run up to 5 restarts in parallel (I am using the linear strategy with 
default forks). For this reason, I set throttle to 1 for this task. 
However, still, subsequent restarts may run too fast in sequence that they 
somehow overlap and systemd errors out.

My question is if there is a way to have throttle with a delay among hosts. 
I considered creating a block that contains the systemd-restart tasks plus 
a sleep  tasks and set throttle there. But I was looking for sth more 
elegant at the task level.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c509af8a-5520-443d-aaf5-f0874f9f062fn%40googlegroups.com.

Reply via email to