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

By Erdem posted 10-28-2015 07:05


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.