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