2014-10-22 20:41:14 +02:00
|
|
|
---
|
|
|
|
- name: Configure Apache.
|
|
|
|
lineinfile:
|
|
|
|
dest: "{{ apache_server_root }}/conf/{{ apache_daemon }}.conf"
|
|
|
|
regexp: "{{ item.regexp }}"
|
|
|
|
line: "{{ item.line }}"
|
|
|
|
state: present
|
2016-02-29 06:32:02 +01:00
|
|
|
with_items: "{{ apache_ports_configuration_items }}"
|
2014-10-22 20:41:14 +02:00
|
|
|
notify: restart apache
|
|
|
|
|
2016-01-16 16:55:07 +01:00
|
|
|
- name: Check whether certificates defined in vhosts exist.
|
|
|
|
stat: path={{ item.certificate_file }}
|
|
|
|
register: apache_ssl_certificates
|
2016-02-29 06:32:02 +01:00
|
|
|
with_items: "{{ apache_vhosts_ssl }}"
|
2016-01-16 16:55:07 +01:00
|
|
|
|
2014-10-22 20:41:14 +02:00
|
|
|
- name: Add apache vhosts configuration.
|
|
|
|
template:
|
2016-09-02 13:37:41 +02:00
|
|
|
src: "{{ apache_vhosts_template }}"
|
2015-01-08 18:29:36 +01:00
|
|
|
dest: "{{ apache_conf_path }}/{{ apache_vhosts_filename }}"
|
2014-10-22 20:41:14 +02:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
notify: restart apache
|
|
|
|
when: apache_create_vhosts
|