---
- name: check apache syntax
command: /usr/sbin/apachectl -t
- name: restart systemd unit apache2
systemd:
name: apache2
state: restarted
- name: update apt cache
apt:
update_cache: yes