---
- name: restart apache2
service: name=apache2 state=restarted enabled=yes
when: ansible_os_family == 'Debian'
service: name=httpd state=restarted enabled=yes
when: ansible_os_family == 'RedHat'