mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-27 08:15:54 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
9
roles/lemonldap_ng_handler/defaults/main.yml
Normal file
9
roles/lemonldap_ng_handler/defaults/main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
llng_conf_backend: soap
|
||||
# llng_soap_uri: https://auth.domain.org/index.pl/config
|
||||
# llng_soap_user: user
|
||||
# llng_soap_pass: password
|
||||
# llng_reload_ip:
|
||||
# - 192.168.133.254
|
||||
|
||||
...
|
1
roles/lemonldap_ng_handler/files/03-perl.conf
Normal file
1
roles/lemonldap_ng_handler/files/03-perl.conf
Normal file
@@ -0,0 +1 @@
|
||||
LoadModule perl_module modules/mod_perl.so
|
3
roles/lemonldap_ng_handler/handlers/main.yml
Normal file
3
roles/lemonldap_ng_handler/handlers/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- include: ../httpd_common/handlers/main.yml
|
||||
...
|
6
roles/lemonldap_ng_handler/meta/main.yml
Normal file
6
roles/lemonldap_ng_handler/meta/main.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: httpd_common }
|
||||
|
||||
...
|
41
roles/lemonldap_ng_handler/tasks/main.yml
Normal file
41
roles/lemonldap_ng_handler/tasks/main.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
|
||||
- name: Install packages
|
||||
yum: name=lemonldap-ng-handler
|
||||
tags:
|
||||
- web
|
||||
- package
|
||||
|
||||
- name: Create configuration directory
|
||||
file: path=/etc/lemonldap-ng state=directory owner=root group={{ httpd_group }} mode=750 setype=httpd_config_t
|
||||
tags:
|
||||
- web
|
||||
- config
|
||||
|
||||
- name: Create local configuration cache directory
|
||||
file: path=/var/cache/lemonldap-ng-handler state=directory owner=root group={{ httpd_group }} mode=770 setype=httpd_cache_t
|
||||
tags:
|
||||
- web
|
||||
|
||||
- name: Deploy main Lemonldap::NG Handler configuration
|
||||
template: src=lemonldap-ng.ini.j2 dest=/etc/lemonldap-ng/lemonldap-ng.ini owner=root group={{ httpd_group }} mode=640
|
||||
notify: reload httpd
|
||||
tags:
|
||||
- web
|
||||
- config
|
||||
|
||||
- name: Load mod_perl
|
||||
copy: src=03-perl.conf dest=/etc/httpd/ansible_conf.modules.d/03-perl.conf
|
||||
notify: reload httpd
|
||||
tags:
|
||||
- web
|
||||
- config
|
||||
|
||||
- name: Deploy Lemonldap::NG Handler configuration in apache
|
||||
template: src=lemonldap-ng-handler.conf.j2 dest=/etc/httpd/ansible_conf.d/10-lemonldap-ng-handler.conf
|
||||
notify: reload httpd
|
||||
tags:
|
||||
- web
|
||||
- config
|
||||
|
||||
...
|
@@ -0,0 +1,8 @@
|
||||
PerlOptions +GlobalRequest
|
||||
PerlRequire Lemonldap/NG/Handler.pm
|
||||
|
||||
<Location /lm-reload>
|
||||
Require ip {{ llng_reload_ip | join(' ') }}
|
||||
PerlHeaderParserHandler Lemonldap::NG::Handler->refresh
|
||||
</Location>
|
||||
|
20
roles/lemonldap_ng_handler/templates/lemonldap-ng.ini.j2
Normal file
20
roles/lemonldap_ng_handler/templates/lemonldap-ng.ini.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
; {{ ansible_managed }}
|
||||
|
||||
[all]
|
||||
{% if llng_conf_backend == 'soap' %}
|
||||
globalStorage=Lemonldap::NG::Common::Apache::Session::SOAP
|
||||
globalStorageOptions={ 'proxy' => '{{ llng_soap_uri | regex_replace('config$','sessions') }}' }
|
||||
{% endif %}
|
||||
|
||||
[configuration]
|
||||
{% if llng_conf_backend == 'soap' %}
|
||||
type=SOAP
|
||||
proxy={{ llng_soap_uri }}
|
||||
{% if llng_soap_user is defined and llng_soap_pass is defined %}
|
||||
User={{ llng_soap_user }}
|
||||
Password={{ llng_soap_pass }}
|
||||
{% endif %}
|
||||
proxyOptions={ timeout => 5 }
|
||||
localStorage=Cache::FileCache
|
||||
localStorageOptions={ 'namespace' => 'LemonLDAPng', 'default_expires_in' => 600, 'directory_umask' => '007', 'cache_root' => '/var/cache/lemonldap-ng-handler', 'cache_depth' => 5, }
|
||||
{% endif %}
|
Reference in New Issue
Block a user