Training
Bootcamp
Courses
Tech Sessions
Resources
Blog
Tips
GitHub
YouTube
Newsletter
Playgrounds
Pricing
Sign In
Become Member
Jinja2 Renderer
Validate and test the rendering of your Jinja templates
Tools
J2 Renderer
TTP Parser
TextFSM Parser
XPath Tester
Members Only
JMESPath Validator
JSON Schema Validator
Data Format Converter
Help Us Improve
Jinja Template
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption {# hostname config ↓ #} hostname {{ device.name | upper}} boot-start-marker boot-end-marker aaa new-model aaa authentication login default local aaa session-id common ethernet lmi ce mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 {# ntp server config ↓ #} {% for ntp_server in ntp_servers %} ntp server {{ ntp_server }} {% endfor %} {# ip domain name config ↓ #} ip domain name {{ domain_name }} {# ip dns server config ↓ #} {% for dns_server in dns_servers %} ip name-server {{dns_server}} {% endfor %} ip cef no ipv6 cef multilink bundle-name authenticated {# interface config ↓ #} {% for interface in interfaces %} {% if interface.ip_addresses %} interface {{ interface.name }} ip address {{ interface.ip_addresses[0].address }} no shutdown {% else %} interface {{ interface.name }} no ip address shutdown {% endif %} {% endfor -%} {# ospf config ↓ #} router ospf 1 network {{ custom_fields.router_id }} 0.0.0.0 area {{ custom_fields.ospf_area }} network 10.1.0.0 0.0.255.255 area 0 network 10.2.0.0 0.0.255.255 area 0 ip route 0.0.0.0 0.0.0.0 172.29.151.254 ip ssh version 2 control-plane line con 0 exec-timeout 0 0 line aux 0 line vty 0 4 privilege level 15 transport input ssh no scheduler allocate
Jinja Data
device: name: "rtr001" ntp_servers: - "192.168.1.1" - "192.168.1.2" domain_name: "example.com" dns_servers: - "8.8.8.8" - "8.8.4.4" interfaces: - name: "GigabitEthernet0/0" ip_addresses: - address: "192.168.10.1/24" - name: "GigabitEthernet0/1" ip_addresses: - address: "192.168.20.1/24" - name: "GigabitEthernet0/2" ip_addresses: [] - name: "GigabitEthernet0/3" ip_addresses: [] - name: "GigabitEthernet0/4" ip_addresses: [] - name: "GigabitEthernet0/5" ip_addresses: [] - name: "GigabitEthernet0/6" ip_addresses: [] custom_fields: router_id: "1.1.1.1" ospf_area: "0"
Result
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption hostname RTR001 boot-start-marker boot-end-marker aaa new-model aaa authentication login default local aaa session-id common ethernet lmi ce mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 ntp server 192.168.1.1 ntp server 192.168.1.2 ip domain name example.com ip name-server 8.8.8.8 ip name-server 8.8.4.4 ip cef no ipv6 cef multilink bundle-name authenticated interface GigabitEthernet0/0 ip address 192.168.10.1/24 no shutdown interface GigabitEthernet0/1 ip address 192.168.20.1/24 no shutdown interface GigabitEthernet0/2 no ip address shutdown interface GigabitEthernet0/3 no ip address shutdown interface GigabitEthernet0/4 no ip address shutdown interface GigabitEthernet0/5 no ip address shutdown interface GigabitEthernet0/6 no ip address shutdown router ospf 1 network 1.1.1.1 0.0.0.0 area 0 network 10.1.0.0 0.0.255.255 area 0 network 10.2.0.0 0.0.255.255 area 0 ip route 0.0.0.0 0.0.0.0 172.29.151.254 ip ssh version 2 control-plane line con 0 exec-timeout 0 0 line aux 0 line vty 0 4 privilege level 15 transport input ssh no scheduler allocate
Show whitespace
Trim blocks
Lstrip blocks
Render
Share
Auto-Sync