是否有方法可以覆盖ansible的超时时间?我正在发送约700行的Cisco iOS配置。但是我收到超时错误:
dir2
是否有增加超时的方法,以便我可以发送整套线路?
ansible.module_utils.connection.ConnectionError: timeout trying to send command
答案 0 :(得分:0)
它们是超时的两个可调参数,persistent_connect_timeout
和persistent_command_timeout
。后者似乎是您必须更改的一个。
您必须编辑ansible.cfg
并输入文字
[persistent_connection]
command_timeout = 30
您还可以作为测试在启动剧本之前定义环境变量ANSIBLE_PERSISTENT_COMMAND_TIMEOUT=30
,以便将其应用于所有网络任务
来源:https://docs.ansible.com/ansible/2.6/network/user_guide/network_debug_troubleshooting.html#timeouts