[英]How to deploy on all GCP instances one-by-one with Ansible?
I'm looking for a solution to deploy my code on all GCP instances of an instance group with ansible. 我正在寻找一种解决方案,以在具有ansible的实例组的所有GCP实例上部署我的代码。 I would list all instances of an instance group and deploy on them one by one to avoid service interruptions.
我将列出一个实例组的所有实例,并一一部署在它们上,以避免服务中断。 Any idea ?
任何想法 ?
Thanks Thomas 谢谢托马斯
I found the solution. 我找到了解决方案。 You must add the "serial" key :
您必须添加“序列号”键:
serial: <number>|"<number>%"
It sets how many hosts at a time to run at a time. 它设置一次运行多少主机。 The default is to run tasks on all of a play's machines at once.
默认设置是一次在所有播放机上运行任务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.