Use of Handlers in Ansible

What are Handlers ?

# e.g of handlers in playbook 
handlers:
— name: service start
service:
name: httpd
state: restarted
notify:
— service start
# cat var.yml
- changeport: 8132
- pagedir: /var/www/arth
---------------------------------------
New configuration file which is copied to target node is :# cat lalit.confListen {{ changeport }}<Virtualhost {{ ansible_default_ipv4.address }}:{{ changeport }}>
DocumentRoot {{ pagedir }}</Virtualhost>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store