Back to Browse

Ansible Advanced Template Loops Tutorial - Use Loop Vars in Your Templates

27.9K views
Jan 21, 2019
7:48

🎓 My new Ansible Course (Productive with Ansible, 2024) now in Early Access: https://learn.toptechskills.com/courses/productive-with-ansible In this tutorial video I respond to a question on my Ansible Template Tutorial post on Reddit (http://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 == https://youtu.be/dXl9Yphzbm4 ✅ SEE HOW I SET UP ANSIBLE == https://youtu.be/bUac43G20JQ ℹ️ UPDATED EXAMPLE IN THE TEMPLATE MODULE TUTORIAL ARTICLE == http://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 ▶️ http://bit.ly/2VWid3D == Playlist of all Ansible videos ⭐️ http://bit.ly/2HavqCu == Subscribe to our YouTube Channel Our Site & Socials 🌐 http://bit.ly/2shtKwZ == TopTechSkills.com 🐦 http://bit.ly/2RkgZkk == @TopTechSkills on Twitter 🐦 http://bit.ly/2AA19aN == @PercyGrunwald on Twitter 😃 http://bit.ly/2ACQgEW == @TopTechSkills on Facebook 🕹 http://bit.ly/2CWR3ST == @PercyGrunwald on Twitch

Download

0 formats

No download links available.

Ansible Advanced Template Loops Tutorial - Use Loop Vars in Your Templates | NatokHD