Hi, Could you please let me know what happens when a connection is lost(Internet) while ansible playbook(with 10 tasks) is executing and task 2 is running.
Does the task 2 complete on target hosts and complete, or does all the 10 tasks gets completed in background.?
Two tasks only will be completed.
You can just using the --step
flag e.g: ansible-playbook playbook.yml --step
. The step asks you on before executing each task and you could choose (N)o/(y)es/(c)ontinue
.
With this approach you selectively execute tasks when needed and also continue from point where it failed, after fixes
Thankyou, this helped.