Scripting How-To: Use custom templates or functions in my automation

by Juniper Employee on ‎10-28-2015 07:05 AM - edited on ‎09-18-2017 02:24 PM by Administrator Administrator (1,576 Views)

Use Custom Templates or Functions


You can use templates to help reduce errors with repetitive tasks.


  • For example, Jinja2 is a convenient templating tool for Ansible and Python.

  • You can use ERB templates in Ruby with Puppet and Chef. Using ERB templates, you can generate any type of text from templates. The templates combine plaintext with Ruby code for variable substitution, which makes them easy for you to write and maintain.


You can increase agility and flexibility by using Puppet with ERB templates and Junos OS.