You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ansible-role-nginx/roles/ansible-role-apache/tasks/configure-RedHat.yml

45 lines
1.1 KiB

---
- name: Configure Apache.
lineinfile:
dest: "{{ apache_server_root }}/conf/{{ apache_daemon }}.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.conf.j2"
dest: "{{ apache_conf_path }}/{{ apache_vhosts_filename }}"
owner: root
group: root
mode: 0644
notify: restart apache
when: apache_create_vhosts
- name: Change to Event MPM
template:
src: "00-mpm.conf.j2"
dest: "{{ apache_modules_path }}/00-mpm.conf"
owner: root
group: root
mode: 0644
notify: restart apache
when: apache_enable_event_mpm
- name: Activate RemoteIP module
template:
src: "90-remoteip.conf.j2"
dest: "{{ apache_modules_path }}/90-remoteip.conf"
owner: root
group: root
mode: 0644
notify: restart apache
when: apache_mods_enabled|remoteip