mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-12-22 19:10:19 +01:00
7aa1f2e0c8
- Suse listen configuration points to listen.conf file - service handler uses service variable
24 lines
687 B
YAML
24 lines
687 B
YAML
---
|
|
- name: Configure Apache.
|
|
lineinfile:
|
|
dest: "{{ apache_server_root }}/listen.conf"
|
|
regexp: "{{ item.regexp }}"
|
|
line: "{{ item.line }}"
|
|
state: present
|
|
with_items: apache_ports_configuration_items
|
|
notify: restart apache
|
|
|
|
- name: Check whether certificates defined in vhosts exist.
|
|
stat: path={{ item.certificate_file }}
|
|
register: apache_ssl_certificates
|
|
with_items: apache_vhosts_ssl
|
|
|
|
- name: Add apache vhosts configuration.
|
|
template:
|
|
src: "vhosts-{{ apache_vhosts_version }}.conf.j2"
|
|
dest: "{{ apache_conf_path }}/{{ apache_vhosts_filename }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart apache
|
|
when: apache_create_vhosts
|