Question: Job Template - "Job Slicing" configuration

Hello,
I have some doubts about the Job Slicing configuration inside the Job templates and I couldn’t find any specific documentation.

I have some questions yet it would be great to also hear some examples and comments about the behavior of this configuration.

  1. Which is the relation between ‘Forks’, ‘Job Slicing’ and Linear strategy with ‘serial’ configuration set?

linear strategy with serial set:

- hosts: all
  serial: 30
  tasks:
  ...
  1. What would happen if I have Forks = 30 forks, Job Slicing = 15, Serial = 30?
  2. What about if I use it with free strategy?
  3. Is there any calculation or best practice to improve the performance of the playbooks with this configuration?

Thanks a lot!

The forks value given in the job template configuration will be applied to all slice jobs, so be aware of that. The only thing slicing is going to do is create N jobs and distribute the inventory evenly (or as close to evenly) as possible. All other parameters (including limit) will be applied the same to all of those jobs.