Help on terminal and cliconf plugin

13 views
Skip to first unread message

Rajas Pachipulusu

unread,
Mar 5, 2019, 12:56:00 AM3/5/19
to ansible...@googlegroups.com
Hi Experts,


I am unable to create terminal and cliconf plugin for my company. Can some one help me in creating it. I can arrange a call.


Thanks in advance.

Thanks,
Rajas

Pshem Kowalczyk

unread,
Mar 5, 2019, 3:54:06 AM3/5/19
to Ansible Project
Hi,

I've written those plugins for some of our in-house devices. Key points:
- You have to tell Ansible where your plugins are, either using environmental variables or via ansible.cfg
- You'll need a module that actually uses your plugins 
- The ios.py (in plugins/cliconf and plugins/terminal) is a very good start, the corresponding module is modules/network/ios/ios_command.py
- getting the regular expression in the terminal plugin (in variable terminal_stdout_re) right is critical - start with something really generic and work from there, if that regular expression doesn't catch the prompt you'll get weird errors about timeouts (even though the ssh session connected fine).
- If you want to debug things - run Ansible in full debug mode (writing to a file), if you need more have a look in https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/connection.py around line 190.

kind regards
Pshem


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/B5F57664-D954-466E-8C0E-2918954A6BE9%40pluribusnetworks.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages