Ansible, Juniper CLI commands. Timeout Error?

前提是你 提交于 2019-12-06 10:50:35

Okay, I managed to fix the problem.

The module for Ansible that does the CLI (junos_cli) doesn't support timeout. I therefor went in to:

/etc/ansible/roles/Juniper.junos/library/junos_cli

And below line:

dev = Device(args['host'], user=args['user'], password=args['passwd'],
                     port=args['port'], gather_facts=False).open()

I added:

dev.timeout=None

This sets the timer to infinity, so I have time for the formatting when doing "request system snapshot slice alternate".

Hope this helps anyone else doing something with the junos cli through ansible automation.

It's suggested to increase the timeout value to some decent number (say 300 sec) which we think should be good for the call, rather than making it infinite.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!