phpldapadmin: mise au point
This commit is contained in:
@@ -11,7 +11,9 @@ Apache +php needed
|
|||||||
Role Variables
|
Role Variables
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
baseddn
|
pla_baseddn
|
||||||
|
pla_install_dir - default /var/www/html
|
||||||
|
pla_version - default 1.2.5
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
---
|
---
|
||||||
# defaults file for phpldapadmin
|
# 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
|
# handlers file for phpldapadmin
|
||||||
- name: reloadhttpd
|
- name: reload_apache
|
||||||
service:
|
service:
|
||||||
name: httpd
|
name: httpd
|
||||||
state: restarted
|
state: reloaded
|
||||||
@@ -1,24 +1,30 @@
|
|||||||
- file:
|
- name: get archive
|
||||||
name: /etc/httpd/conf.d/php-fpm-7.conf
|
get_url:
|
||||||
state: absent
|
url: https://github.com/leenooks/phpLDAPadmin/archive/{{ pla_version }}.tar.gz
|
||||||
notify: reloadhttpd
|
dest: /tmp/pla_{{pla_version }}.gz
|
||||||
- yum:
|
- yum:
|
||||||
name: rh-php70-php-*
|
name: [ php-ldap, php-xml ]
|
||||||
state: absent
|
|
||||||
notify: reloadhttpd
|
|
||||||
- yum:
|
|
||||||
name: [ php, php-ldap ]
|
|
||||||
state: installed
|
state: installed
|
||||||
notify: reloadhttpd
|
|
||||||
- unarchive:
|
- unarchive:
|
||||||
dest: /var/www/html
|
dest: /{{ pla_install_dir }}
|
||||||
src: pla.tgz
|
src: /tmp/pla_{{pla_version }}.gz
|
||||||
|
remote_src: true
|
||||||
- file:
|
- file:
|
||||||
src: /var/www/html/phpldapadmin-1.2.3
|
src: /{{ pla_install_dir }}/phpLDAPadmin-{{ pla_version }}
|
||||||
state: link
|
state: link
|
||||||
dest: /var/www/html/pla
|
dest: /{{ pla_install_dir }}/pla
|
||||||
|
|
||||||
- template:
|
- template:
|
||||||
src: pla_config.php
|
src: pla_config.php
|
||||||
dest: /var/www/html/pla/config/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
|
/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
|
||||||
auto-detect it for you. */
|
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:
|
/* Five options for auth_type:
|
||||||
1. 'cookie': you will login via a web form, and a client-side cookie will
|
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