ansible-role-apache/tasks/apache-config-deb.yml

23 lines
681 B
YAML

---
# On deb systems the packaged apache2.conf is left alone: only the listening
# ports and the default virtualhost are managed.
- name: apache-config-deb | Install the ports conf file
ansible.builtin.template:
src: ports.conf
dest: '{{ apache_base_conf_dir }}/ports.conf'
owner: root
group: root
mode: '0444'
notify: apache2 reload
tags: [ 'apache', 'apache_conf' ]
- name: apache-config-deb | Remove the default virtualhost file
ansible.builtin.file:
dest: '{{ apache_base_conf_dir }}/sites-enabled/{{ item }}'
state: absent
with_items:
- 000-default
- 000-default.conf
notify: apache2 reload
tags: [ 'apache', 'apache_conf' ]