Separate module enable tasks in apache-php, enable headers

This commit is contained in:
Salt 2020-02-20 03:49:06 -06:00
parent 0f8ed190b7
commit 75ae2367d4

View File

@ -35,8 +35,17 @@
path: "/etc/apache2/sites-enabled/000-default.conf"
state: absent
- name: Enable modules
shell: "{{ item }}"
loop:
- "a2enmod rewrite"
- "a2enmod ssl"
block:
- name: Enable rewrite
command: "/usr/sbin/a2enmod rewrite"
args:
creates: /etc/apache2/mods-enabled/rewrite.load
- name: Enable SSL
command: "/usr/sbin/a2enmod ssl"
args:
creates: /etc/apache2/mods-enabled/ssl.load
- name: Enable header modification
command: "/usr/sbin/a2enmod headers"
args:
creates: /etc/apache2/mods-enabled/headers.load
become: yes