add restart of apache when module enabled

This commit is contained in:
Antonio J. Delgado 2023-02-08 21:28:05 +02:00
parent 58804fc86b
commit 4fbcdc581a

View file

@ -78,8 +78,15 @@
force: True
name: "{{ item }}"
with_items: "{{ apache_modules }}"
register: enabled_mods
when: apache_modules is defined
- name: Ensure Apache is restarted after enabling modules
service:
name: apache2
state: restarted
when: enabled_mods.changed
- name: Ensure vhost docroot exists
file:
path: "{{ item.docroot | default('/var/www/{{ item.vhostname }}') }}"