Categories

Category cover

Automation
155 posts

Category cover

Learning paths
119 posts

Category cover

CISO
22 posts

Category cover

Security
20 posts

Category cover

Notes
19 posts

Category cover

Personal Security
18 posts

Category cover

Infrastructure
12 posts

Category cover

OT/ICS
5 posts

Category cover

Books
3 posts

Category cover

UNetLab
3 posts

Category cover

Write-up
3 posts

Category cover

OSInt
2 posts

Category cover

My life
1 posts

Using Ansible handlers for optimized task execution

Andrea Dainese
October 16, 2024
Post cover

Handlers allow you to associate actions with tasks that make changes to devices. The key feature of handlers is that they are executed once, right before the end of the playbook.

A good example is saving a configuration. Throughout a playbook, configurations may be modified multiple times, but saving can happen only once at the end of the playbook.

Here’s a task that configures NTP servers:

Continue reading the post on Patreon .