When we target minions by globbing, or nodegroups, the defined states will be applied to them in parallel. So one way to achieve this is by moving the “reboot minion” functionality into the state file
# Some tasks to perform patching, just using 'include' for example # from /srv/salt/patching/os_pkg.sls include: - patching.os_pkg reboot-after-package-update: module.run: - name: system.reboot
And in orchestrate
patch-group1: salt.state: - tgt: group1 - tgt_type: nodegroup - sls: - patch-n1 patch-group2: salt.state: - tgt: group2 - tgt_type: nodegroup - sls: - patch-n2
When we run the orchestration, the each minion will run patching and reboot in parallel.
CLICK HERE to find out more related problems solutions.