There are 4 strategies that can be used.
The ansible-doc command can be used to display documentation on the each strategy.
ansible-doc -t strategy --snippet linear
With the linear strategy, each task is performed against all of the managed nodes (e.g. target systems) before moving onto the next task. For example, let's say the file module is being used to create two directories, /tmp/foo and /tmp/bar. linear is the default strategy, thus there is no need to define linear as the strategy in the playbook.
--- - hosts: all tasks: - name: mkdir /tmp/foo file: path: /tmp/foo state: directory - name: mkdir /tmp/bar file: path: /tmp/bar state: directory ...
Let's say you have 5 managed nodes in your inventory, server1 through server5. In this example, this means that the /tmp/foo directory would be created on server1 through server5 before moving onto the task to create the /tmp/bar directory on server1 through server5.
Optionally, you can define linear as the strategy in ansible.cfg. But this is not required, since linear is the default strategy.
strategy = linear