哪个ansible.cfg超时值是"-T"?覆盖ansible-playbook命令? [英] Which ansible.cfg timeout value is "-T" overriding on the ansible-playbook command?

查看:573
本文介绍了哪个ansible.cfg超时值是"-T"?覆盖ansible-playbook命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ansible-playbook文档说,-T将覆盖连接超时(以秒为单位,默认值为10).

The ansible-playbook documentation says that -T will "override the connection timeout in seconds (default=10)".

/etc/ansible/ansible.cfg文件中,在[persistent_connection]部分下,有 connect_timeout (默认30秒) command_timeout (默认10秒).

In the /etc/ansible/ansible.cfg file, under the [persistent_connection] section, there's connect_timeout (default 30 sec) and command_timeout (default 10 sec).

ansible-playbook文档会建议覆盖 connect_timeout ,但页面指定的默认值与 connect_timeout 默认值不匹配,它与 command_timeout 默认值.

The ansible-playbook documentation would suggest it's the connect_timeout being overridden, but the default value that page specifies doesn't match the connect_timeout default value, it matches the command_timeout default value.

那么,ansible-playbook命令上的-T标志是否覆盖 connect_timeout command_timeout 或与这两个都不相关的其他超时?

So, does the -T flag on the ansible-playbook command override the connect_timeout, command_timeout, or some other timeout not related to either of those?

推荐答案

-TDEFAULT_TIMEOUT配置设置等效.

DEFAULT_TIMEOUT:
  default: 10
  description: This is the default timeout for connection plugins to use.
  env:
  - {name: ANSIBLE_TIMEOUT}
  ini:
  - {key: timeout, section: defaults}
  name: Connection timeout
  type: integer

对于ssh连接插件,它是否用作ConnectTimeout=<value>,意思是:

For ssh connections plugin is it used as ConnectTimeout=<value>, meaning:

ConnectTimeout
   Specifies the timeout (in seconds) used when connecting to the SSH server, instead of using the default system TCP timeout.
   This value is used only when the target is down or really unreachable, not when it refuses the connection.

command_timeout关于:

PERSISTENT_COMMAND_TIMEOUT:
  default: 10
  description: This controls the amount of time to wait for response from remote device
    before timing out presistent connection.
  env:
  - {name: ANSIBLE_PERSISTENT_COMMAND_TIMEOUT}
  ini:
  - {key: command_timeout, section: persistent_connection}
  name: Persistence command timeout
  type: int

这篇关于哪个ansible.cfg超时值是"-T"?覆盖ansible-playbook命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆