Help on terminal and cliconf plugin

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

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