mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
19 lines
580 B
YAML
19 lines
580 B
YAML
# ordinarily, without the 'serial' keyword set, ansible will control all of your machines in a play at once, in parallel.
|
|
# if you want to perform a rolling update, so that each play completes all the way through on a certain number of hosts
|
|
# before moving on to the remaining hosts, use the 'serial' keyword like so:
|
|
|
|
---
|
|
- hosts: all
|
|
serial: 3
|
|
|
|
# now each of the tasks below will complete on 3 hosts before moving on to the next 3, regardless of how many
|
|
# hosts are selected by the "hosts:" line
|
|
|
|
tasks:
|
|
|
|
- name: ping
|
|
action: ping
|
|
- name: ping2
|
|
action: ping
|
|
|
|
|