mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-12-22 19:10:19 +01:00
ae3a1a6332
The only real difference between apache version 2.2 and 2.4 are the "Order/Allow" directives which have been replaced with "Require", so there seems to be no need to maintain two separate templates. As a side-effect, this merges geerlingguy/ansible-role-apache#69 into the apache 2.2 config.
19 lines
510 B
YAML
19 lines
510 B
YAML
---
|
|
- name: Configure Apache.
|
|
lineinfile:
|
|
dest: "{{ apache_server_root }}/{{ apache_daemon }}.conf"
|
|
regexp: "{{ item.regexp }}"
|
|
line: "{{ item.line }}"
|
|
state: present
|
|
with_items: "{{ apache_ports_configuration_items }}"
|
|
notify: restart apache
|
|
|
|
- name: Add apache vhosts configuration.
|
|
template:
|
|
src: "vhosts.conf.j2"
|
|
dest: "{{ apache_conf_path }}/{{ apache_vhosts_filename }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart apache
|
|
when: apache_create_vhosts
|