forked from ISTI-ansible-roles/ansible-roles
dnet-openaire/virtuoso.yml: add an apache proxy
library/roles/apache: enable ssl, proxy and optionally any other module
This commit is contained in:
parent
c59e81b940
commit
4b6d16be88
|
@ -16,6 +16,16 @@ apache_default_modules:
|
||||||
- expires
|
- expires
|
||||||
- xsendfile
|
- 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: False
|
||||||
apache_basic_auth_single_file: True
|
apache_basic_auth_single_file: True
|
||||||
apache_basic_auth_dir: /etc/apache2/auth
|
apache_basic_auth_dir: /etc/apache2/auth
|
||||||
|
@ -30,3 +40,8 @@ apache_basic_auth_modules:
|
||||||
# apache_basic_users:
|
# apache_basic_users:
|
||||||
# - { username:'', password:'', state:'present,absent', auth_file:'path_to_file' }
|
# - { username:'', password:'', state:'present,absent', auth_file:'path_to_file' }
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set this variable to load the modules you need
|
||||||
|
#apache_additional_modules:
|
||||||
|
# -
|
||||||
|
# -
|
||||||
|
|
|
@ -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' ]
|
|
@ -2,15 +2,13 @@
|
||||||
- name: Install the apache packages
|
- name: Install the apache packages
|
||||||
apt: pkg={{ item }} state=installed force=yes
|
apt: pkg={{ item }} state=installed force=yes
|
||||||
with_items: apache_packages
|
with_items: apache_packages
|
||||||
tags:
|
tags: apache
|
||||||
- apache
|
|
||||||
|
|
||||||
- name: Load the required modules
|
- name: Load the required modules
|
||||||
apache2_module: name={{ item }} state=present
|
apache2_module: name={{ item }} state=present
|
||||||
with_items: apache_default_modules
|
with_items: apache_default_modules
|
||||||
notify: apache2 reload
|
notify: apache2 reload
|
||||||
tags:
|
tags: apache
|
||||||
- apache
|
|
||||||
|
|
||||||
- name: Remove the default virtualhost file
|
- name: Remove the default virtualhost file
|
||||||
file: dest=/etc/apache2/sites-enabled/{{ item }} state=absent
|
file: dest=/etc/apache2/sites-enabled/{{ item }} state=absent
|
||||||
|
@ -18,5 +16,4 @@
|
||||||
- 000-default
|
- 000-default
|
||||||
- 000-default.conf
|
- 000-default.conf
|
||||||
notify: apache2 reload
|
notify: apache2 reload
|
||||||
tags:
|
tags: apache
|
||||||
- apache
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
- include: apache.yml
|
- include: apache.yml
|
||||||
|
- include: apache-modules.yml
|
||||||
- include: apache-basic-auth.yml
|
- include: apache-basic-auth.yml
|
||||||
when: apache_basic_auth
|
when: apache_basic_auth
|
||||||
|
|
Loading…
Reference in New Issue