Python Jinja2 Template Tutorial using YAML | Network Automation
Dr Pi
How to use YAML with Python Code to automate config creation
What this video covers ◼️ Creating YAML ◼️ Condtional logic in Jinja
== Chapter timings ==
0:00 Intro 0:47 What is YAML 3:21 Jinja template with conditional logic 6:23 Python code using YAML and Jinja template 9:31 Python output in vscode : config ready for Cisco Router
Note: ⭕ YAML is case sensitive ⭕ Use .yaml as the file extension ⭕ YAML does NOT allow the use of tabs ⭕ (use spaces instead) ⭕ If you don't already have it installed : pip install PyYAML
Useful Links: 🌏 https://blog.stackpath.com/yaml/ 🌏 http://networkbit.ch/python-jinja-template/ 🌏 https://pyyaml.docsforge.com/master/api/yaml/full_load/
Visit redandgreen blog for more Tutorials
🌏 http://redandgreen.co.uk/about/blog/
Subscribe to the YouTube Channel
🌏 https://www.youtube.com/c/DrPiCode
Follow on Twitter - to get notified of new videos
👍 Become a patron 👍 🌏 https://www.patreon.com/drpi
Buy Dr Pi a coffee (or Tea) ☕ https://www.buymeacoffee.com/DrPi
Proxies
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?
You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! 👍
🌏 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49 ◼️ Coupon Code: DRPI10 (You can also get started with 1000 free API calls. No credit card required.)
Thumbs up yeah? (cos Algos..)
#Jinja #tutorials #python ... https://www.youtube.com/watch?v=WpKW8rPGVvU
55085859 Bytes