ansible -playbook 文档说 -T 将“以秒为单位覆盖连接超时(默认=10)”。
在/etc/ansible/ansible.cfg文件的 部分下[persistent_connection],有connect_timeout (默认 30 秒)和command_timeout (默认 10 秒)。
ansible-playbook 文档表明 connect_timeout被覆盖,但页面指定的默认值与connect_timeout默认值不匹配,它与command_timeout默认值匹配。
那么,ansible-playbook 命令上的 -T 标志是否会覆盖connect_timeout、command_timeout或与其中任何一个都不相关的其他超时?
-T相当于DEFAULT_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
Run Code Online (Sandbox Code Playgroud)
对于ssh连接插件,它被用作ConnectTimeout=<value>,意思是:
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.
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10714 次 |
| 最近记录: |