# why handers sub topic is not indented same like tasks or vars

**URL:** <https://forum.ansible.com/t/why-handers-sub-topic-is-not-indented-same-like-tasks-or-vars/25270>\
**Category:** Ansible Project\
**Created:** [August 16, 2017, 6:03pm UTC](https://forum.ansible.com/t/why-handers-sub-topic-is-not-indented-same-like-tasks-or-vars/25270 "2017-08-16T18:03:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sameer\_Modak](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sameer_modak/32/5180_2.png) [@Sameer\_Modak](https://forum.ansible.com/u/Sameer_Modak)\
**Post date:** [August 16, 2017, 6:03pm UTC](https://forum.ansible.com/t/why-handers-sub-topic-is-not-indented-same-like-tasks-or-vars/25270/1 "2017-08-16T18:03:24Z")

</div>

How understand and practice correct way of yml or indentation, so confusing

- hosts: webservers  
vars:  
http\_port: 80  
max\_clients: 200  
remote\_user: root  
tasks:
- name: ensure apache is at the latest version ----\> here no extra spaces like in handlers tag  
yum: name=httpd state=latest
- name: write the apache config file  
template: src=/srv/httpd.j2 dest=/etc/httpd.conf  
notify:
- restart apache
- name: ensure apache is running (and enable it at boot)  
service: name=httpd state=started enabled=yes  
handlers:
- name: restart apache ----- -----\> here i see two spaces before - Why is it so it so confusing to remember when to give 2 spaces and when not  
service: name=httpd state=restarted

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [August 18, 2017, 7:42pm UTC](https://forum.ansible.com/t/why-handers-sub-topic-is-not-indented-same-like-tasks-or-vars/25270/2 "2017-08-18T19:42:26Z")

</div>

You don't need to two extra spaces in front as you have in handlers, you only need to be consistent on the same level.
