library/roles/apache: manage the installation of the rpaf module.

This commit is contained in:
Andrea Dell'Amico 2017-03-22 17:38:46 +01:00
parent 8c2262a3f0
commit 2f169ba97c
2 changed files with 14 additions and 0 deletions

View File

@ -26,6 +26,9 @@ apache_worker_modules:
- { name: 'mpm_prefork', state: 'absent' }
- { name: 'mpm_{{ apache_mpm_mode }}', state: 'present' }
# apache RPAF is needed to obtain the real client addresses when behind a reverse proxy
apache_rpaf_install: False
apache_default_modules:
- headers
- rewrite

View File

@ -1,4 +1,15 @@
---
- name: Install the libapache2-mod-rpaf module
apt: pkg=libapache2-mod-rpaf state=present
when: apache_rpaf_install
tags: [ 'apache', 'apache_mods', 'apache_rpaf' ]
- name: Enable the apache rpaf module
apache2_module: name=rpaf state=present
when: apache_rpaf_install
notify: apache2 reload
tags: [ 'apache', 'apache_mods', 'apache_rpaf' ]
- name: Load the apache ssl modules
apache2_module: name={{ item }} state=present
with_items: '{{ apache_ssl_modules }}'