2024-03-29 08:17:09 发布
网友
我们的部署脚本带有fabric,它有一个主机列表:
env.hosts = ['services', 'w1zA', 'w1zB']
但我们还有两台服务器,当压力更大时,它们会打开和关闭。你知道吗
所以我希望我的hosts变量是:
env.hosts = ['services', 'w1zA', 'w1zB', 'w2zA', 'w2zB']
但是现在当我在其他服务器关闭时运行脚本时, 部署失败,因为它无法连接到这些服务器。你知道吗
如果服务器关闭,如何跳过故障?你知道吗
您可以使用env.skip_bad_hosts = True选项。你知道吗
env.skip_bad_hosts = True
以下是关于它的文档:http://docs.fabfile.org/en/latest/usage/env.html#skip-bad-hosts
您可以使用
env.skip_bad_hosts = True
选项。你知道吗以下是关于它的文档:http://docs.fabfile.org/en/latest/usage/env.html#skip-bad-hosts
相关问题 更多 >
编程相关推荐