Playback starts YouTube’s embedded player (privacy-enhanced mode).
Ansible Advanced Template Loops Tutorial - Use Loop Vars in Your Templates
ChannelPercy Grunwald from TopTechSkillsDescription from the creator
🎓 My new Ansible Course (Productive with Ansible, 2024) now in Early Access: learn.toptechskills.com/courses/productive-with…
In this tutorial video I respond to a question on my Ansible Template Tutorial post on Reddit (bit.ly/2RC73T6). @movethrowaway2018 asked:
"How do I replace vars in the template that change with each loop? For example, what if I want to copy a template for a .gitconfig file for multiple users to each user's home directory?"
Great question! In this tutorial I show you my solution to this problem using the Ansible Template Module with a loop.
- 0:46 -- Playbook & Variables (how I set everything up)
- 1:30 -- Ensure Users Exist
- 3:18 -- Create .gitconfig for Each User (using the loop vars in the template)
▶️ TEMPLATE TUTORIAL VIDEO == youtu.be/dXl9Yphzbm4
✅ SEE HOW I SET UP ANSIBLE == youtu.be/bUac43G20JQ
ℹ️ UPDATED EXAMPLE IN THE TEMPLATE MODULE TUTORIAL ARTICLE == bit.ly/2RY2YrH
Thanks for watching and hope it's entertaining/useful for you! Hit me up in the comments if you have any questions or feedback 💪.
Related & Channel
▶️ bit.ly/2VWid3D == Playlist of all Ansible videos
⭐️ bit.ly/2HavqCu == Subscribe to our YouTube Channel
Our Site & Socials
🌐 bit.ly/2shtKwZ == TopTechSkills.com
🐦 bit.ly/2RkgZkk == @TopTechSkills on Twitter
🐦 bit.ly/2AA19aN == @PercyGrunwald on Twitter
😃 bit.ly/2ACQgEW == @TopTechSkills on Facebook
🕹 bit.ly/2CWR3ST == @PercyGrunwald on Twitch
In this tutorial video I respond to a question on my Ansible Template Tutorial post on Reddit (bit.ly/2RC73T6). @movethrowaway2018 asked:
"How do I replace vars in the template that change with each loop? For example, what if I want to copy a template for a .gitconfig file for multiple users to each user's home directory?"
Great question! In this tutorial I show you my solution to this problem using the Ansible Template Module with a loop.
- 0:46 -- Playbook & Variables (how I set everything up)
- 1:30 -- Ensure Users Exist
- 3:18 -- Create .gitconfig for Each User (using the loop vars in the template)
▶️ TEMPLATE TUTORIAL VIDEO == youtu.be/dXl9Yphzbm4
✅ SEE HOW I SET UP ANSIBLE == youtu.be/bUac43G20JQ
ℹ️ UPDATED EXAMPLE IN THE TEMPLATE MODULE TUTORIAL ARTICLE == bit.ly/2RY2YrH
Thanks for watching and hope it's entertaining/useful for you! Hit me up in the comments if you have any questions or feedback 💪.
Related & Channel
▶️ bit.ly/2VWid3D == Playlist of all Ansible videos
⭐️ bit.ly/2HavqCu == Subscribe to our YouTube Channel
Our Site & Socials
🌐 bit.ly/2shtKwZ == TopTechSkills.com
🐦 bit.ly/2RkgZkk == @TopTechSkills on Twitter
🐦 bit.ly/2AA19aN == @PercyGrunwald on Twitter
😃 bit.ly/2ACQgEW == @TopTechSkills on Facebook
🕹 bit.ly/2CWR3ST == @PercyGrunwald on Twitch
About this tutorial
Percy Grunwald from TopTechSkills published this 7:49 video tutorial on October 29, 2019. It has been watched 27,949 times on YouTube.
- Category
- Science & Technology
- Duration
- 7:49
- Published
- October 29, 2019
- Views
- 27,949
- Likes
- 609
Tags
Share
This tutorial in other languages
- FRAnsible avancée Modèle boucles Tutorial - Utilisation en boucle dans vos modèles Vars
- ESAnsible avanzada Plantilla Loops Tutorial - Uso Loop Vars en sus plantillas
- PTAnsible Avançada modelo Loops Tutorial - Use loop Vars em seus modelos
- ITAnsible avanzata Template Loops Tutorial - Utilizzo Loop Vars nei modelli
- DEAnsible Erweiterte Template Loops Tutorial - Verwenden Sie Loop-Vars in Ihre Vorlagen
- NLAnsible Geavanceerde Template Loops Tutorial - Gebruik Loop Vars in uw sjablonen
- RUАнзибль Advanced Template Loops Учебник - Использование Loop Варс в шаблонах
- PLAnsibl zaawansowane Szablon Pętle Tutorial - Użycie pętli Vars w szablonach
- JAAnsible高度なテンプレートのループチュートリアル - あなたのテンプレートで使用ループバール
- ARAnsible المتقدم قالب حلقات دروس - استخدام حلقة فار في القوالب
- HIAnsible उन्नत खाका लूप्स ट्यूटोरियल - आपका टेम्प्लेट में उपयोग लूप Vars
- IDAnsible Lanjutan Template Loops Tutorial - Gunakan loop Vars di Template Anda