dnet-openaire/virtuoso.yml: add an apache proxy

library/roles/apache: enable ssl, proxy and optionally any other module
This commit is contained in:
Andrea Dell'Amico 2015-07-14 17:43:27 +02:00
parent c59e81b940
commit 4b6d16be88
4 changed files with 40 additions and 6 deletions

View File

@ -16,6 +16,16 @@ apache_default_modules:
- expires
- xsendfile
apache_ssl_modules_enabled: True
apache_ssl_modules:
- ssl
- socache_shmcb
apache_http_proxy_modules_enabled: False
apache_http_proxy_modules:
- proxy
- proxy_ajp
- proxy_http
apache_basic_auth: False
apache_basic_auth_single_file: True
apache_basic_auth_dir: /etc/apache2/auth
@ -30,3 +40,8 @@ apache_basic_auth_modules:
# apache_basic_users:
# - { username:'', password:'', state:'present,absent', auth_file:'path_to_file' }
#
# Set this variable to load the modules you need
#apache_additional_modules:
# -
# -

View File

@ -0,0 +1,21 @@
---
- name: Load the apache ssl modules
apache2_module: name={{ item }} state=present
with_items: apache_ssl_modules
when: apache_ssl_modules_enabled
notify: apache2 reload
tags: [ 'apache', 'apache_mods' ]
- name: Load some apache proxy modules
apache2_module: name={{ item }} state=present
with_items: apache_http_proxy_modules
when: apache_http_proxy_modules_enabled
notify: apache2 reload
tags: [ 'apache', 'apache_mods' ]
- name: Load additional apache modules if any
apache2_module: name={{ item }} state=present
with_items: apache_additional_modules
when: apache_additional_modules is defined
notify: apache2 reload
tags: [ 'apache', 'apache_mods' ]

View File

@ -2,15 +2,13 @@
- name: Install the apache packages
apt: pkg={{ item }} state=installed force=yes
with_items: apache_packages
tags:
- apache
tags: apache
- name: Load the required modules
apache2_module: name={{ item }} state=present
with_items: apache_default_modules
notify: apache2 reload
tags:
- apache
tags: apache
- name: Remove the default virtualhost file
file: dest=/etc/apache2/sites-enabled/{{ item }} state=absent
@ -18,5 +16,4 @@
- 000-default
- 000-default.conf
notify: apache2 reload
tags:
- apache
tags: apache

View File

@ -1,4 +1,5 @@
---
- include: apache.yml
- include: apache-modules.yml
- include: apache-basic-auth.yml
when: apache_basic_auth