在 ansible playbook 中为一项任务设置叉子 [英] Set forks for one task in ansible playbook
本文介绍了在 ansible playbook 中为一项任务设置叉子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的剧本中有一项任务,我只想一次在一台主机上运行.其余的任务我想兑现 --forks 选项.这可能吗?
I have one task in my playbook that I want to run on only one host at a time. The rest of the tasks I want to honor the --forks option. Is this possible?
推荐答案
Yes checkout 滚动更新
Yes checkout rolling updates
特别是你可以为一个游戏添加一个serial:x"参数,其中x是分叉的数量
specifically you can add a "serial: x" parameter for a play where x is the number of forks
这篇关于在 ansible playbook 中为一项任务设置叉子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文