phpldapadmin: mise au point
This commit is contained in:
@@ -11,7 +11,9 @@ Apache +php needed
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
baseddn
|
||||
pla_baseddn
|
||||
pla_install_dir - default /var/www/html
|
||||
pla_version - default 1.2.5
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
# defaults file for phpldapadmin
|
||||
basedn: dc=lxd
|
||||
pla_version: 1.2.4
|
||||
pla_install_dir: /var/www/html/
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# handlers file for phpldapadmin
|
||||
- name: reloadhttpd
|
||||
- name: reload_apache
|
||||
service:
|
||||
name: httpd
|
||||
state: restarted
|
||||
state: reloaded
|
||||
@@ -1,24 +1,30 @@
|
||||
- file:
|
||||
name: /etc/httpd/conf.d/php-fpm-7.conf
|
||||
state: absent
|
||||
notify: reloadhttpd
|
||||
- yum:
|
||||
name: rh-php70-php-*
|
||||
state: absent
|
||||
notify: reloadhttpd
|
||||
- yum:
|
||||
name: [ php, php-ldap ]
|
||||
state: installed
|
||||
notify: reloadhttpd
|
||||
- unarchive:
|
||||
dest: /var/www/html
|
||||
src: pla.tgz
|
||||
- file:
|
||||
src: /var/www/html/phpldapadmin-1.2.3
|
||||
state: link
|
||||
dest: /var/www/html/pla
|
||||
- name: get archive
|
||||
get_url:
|
||||
url: https://github.com/leenooks/phpLDAPadmin/archive/{{ pla_version }}.tar.gz
|
||||
dest: /tmp/pla_{{pla_version }}.gz
|
||||
- yum:
|
||||
name: [ php-ldap, php-xml ]
|
||||
state: installed
|
||||
|
||||
- template:
|
||||
src: pla_config.php
|
||||
dest: /var/www/html/pla/config/config.php
|
||||
- unarchive:
|
||||
dest: /{{ pla_install_dir }}
|
||||
src: /tmp/pla_{{pla_version }}.gz
|
||||
remote_src: true
|
||||
- file:
|
||||
src: /{{ pla_install_dir }}/phpLDAPadmin-{{ pla_version }}
|
||||
state: link
|
||||
dest: /{{ pla_install_dir }}/pla
|
||||
|
||||
- template:
|
||||
src: pla_config.php
|
||||
dest: /{{ pla_install_dir }}/pla/config/config.php
|
||||
- name: clean up
|
||||
file:
|
||||
path: /tmp/pla_{{pla_version }}.gz
|
||||
state: absent
|
||||
- name: deploy apache config
|
||||
template:
|
||||
src: pla_httpd.conf
|
||||
dest: /etc/httpd/conf.d/pla.conf
|
||||
notify: reload_apache
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ $servers->setValue('server','host','127.0.0.1');
|
||||
|
||||
/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
|
||||
auto-detect it for you. */
|
||||
$servers->setValue('server','base',array('cn=config','{{ basedn }}'));
|
||||
$servers->setValue('server','base',array('cn=config','{{ pla_basedn }}'));
|
||||
|
||||
/* Five options for auth_type:
|
||||
1. 'cookie': you will login via a web form, and a client-side cookie will
|
||||
|
||||
3
templates/pla_httpd.conf
Normal file
3
templates/pla_httpd.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
<Directory {{ pla_install_dir }}/pla/>
|
||||
require all granted
|
||||
</Directory>
|
||||
Reference in New Issue
Block a user