在Ansible剧本中为一项任务设置分叉 [英] Set forks for one task in ansible playbook
本文介绍了在Ansible剧本中为一项任务设置分叉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的剧本中有一项任务,想一次只在一个主机上运行.我想兑现--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?
推荐答案
是结帐滚动更新
具体来说,您可以为播放添加"serial:x"参数,其中x是分叉数
specifically you can add a "serial: x" parameter for a play where x is the number of forks
这篇关于在Ansible剧本中为一项任务设置分叉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文