Tired of Repetitive Tasks? Learn the Magic of Ansible Handlers

Описание к видео Tired of Repetitive Tasks? Learn the Magic of Ansible Handlers

✅ Full code from the video on Github: https://github.com/toptechskills/yt-2...
🛠️ DEV ENVIRONMENT SETUP (free portion of Productive with Ansible course, updated): https://learn.toptechskills.com/cours... (early access)

In this video I show how to use handlers in your playbooks and roles, starting with the super common workflow of restarting a service when Ansible changes the service configuration. Handlers are the standard way of reacting to changes made by tasks in Ansible, and they’re one of the best ways to keep your playbooks and roles idempotent. Handlers are a special kind of Ansible task that are run only when other tasks in your playbook or role make a change. After the basic examples I do a rapid-fire deep-dive into some common questions and gotchas that should save you a bunch of time and headaches when using handlers in your own projects.

0:38 - Walkthrough of playbook installing nginx, changing its config and reloading it (without handlers)
2:30 - How to use handlers to reload a service in an Ansible playbook
4:33 - How to use handlers to reload a service in an Ansible role
6:28 - When exactly do handlers run?
8:19 - What happens if you trigger the same handler from multiple tasks?
9:19 - Can you trigger multiple handlers from the same task?
10:29 - Can handlers trigger other handlers?
11:20 - Can you control when handlers run? (flushing handlers)

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

Комментарии

Информация по комментариям в разработке