Hi@akhtar,
Handlers are just like normal tasks in an Ansible playbook but they run only when if the Task contains a “notify” directive. It also indicates that it changed something. I have attached one example below.
- name: webserver
hosts: WORKSPACE
tasks:
- name: Install nginx
package:
name: nginx
state: present
notify:
Start nginx
handlers:
- name: Start nginx
service:
name: nginx
state: started