1. Forks
"forks" specifies the maximum number of managed nodes that can run tasks at the same time. This doesn't mean the actual number of running nodes which also is affected by the actual count of nodes, strategy, and serial.
Forks can be set by command line or in a playbook.
$ ansible --forks=5
---
- hosts: all
forks: 5
2. Strategy
"strategy" controls how managed nodes work with each other. It has two values now.
- linear (default): all nodes must finish the current task before any host can start the next task.
- free: any node can run its tasks freely and doesn't care about other nodes
3. Serial
"serial" modify the "linear strategy" by splitting the nodes into groups that run together. One group must be done before the next group can run the play.
This is usually used to do rolling updates.
No comments:
Post a Comment