up version
This commit is contained in:
@@ -3,6 +3,8 @@ Role Name
|
|||||||
|
|
||||||
Quick and dirty playbook to install phpldapadmin
|
Quick and dirty playbook to install phpldapadmin
|
||||||
|
|
||||||
|
We are using leenooks' fork
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
@@ -13,7 +15,12 @@ Role Variables
|
|||||||
|
|
||||||
pla_baseddn
|
pla_baseddn
|
||||||
pla_install_dir - default /var/www/html
|
pla_install_dir - default /var/www/html
|
||||||
pla_version - default 1.2.5
|
pla_version - default 1.2.6.3
|
||||||
|
pla_user - account to use to connect to ldap directory
|
||||||
|
pla_basedn - no default
|
||||||
|
pla_ldap_server - default {{ localhost }}
|
||||||
|
pla_bind_dn - "{{ lookup( 'keepass', '{{ group_names[0] }}/{{ inventory_hostname }})pla_dn', 'username' ) }}"
|
||||||
|
pla_bin_pwd: "{{ lookup( 'keepass', '{{ group_names[0] }}/{{ inventory_hostname }})pla_dn', 'password' ) }}"
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|||||||
1
TODO
Normal file
1
TODO
Normal file
@@ -0,0 +1 @@
|
|||||||
|
if ldap dn and password is set: create user on server first
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
# defaults file for phpldapadmin
|
# defaults file for phpldapadmin
|
||||||
pla_version: 1.2.6.2
|
pla_version: 1.2.6.4
|
||||||
pla_install_dir: /var/www/html/
|
pla_install_dir: /var/www/html/
|
||||||
|
pla_ldap_server: localhost
|
||||||
@@ -1,8 +1,15 @@
|
|||||||
- name: get archive
|
- name: get some vars
|
||||||
|
set_facts:
|
||||||
|
pla_bind_dn: "{{ lookup( 'keepass', '{{ group_names[0] }}/{{ inventory_hostname }})pla_dn', 'username' ) }}"
|
||||||
|
pla_bin_pwd: "{{ lookup( 'keepass', '{{ group_names[0] }}/{{ inventory_hostname }})pla_dn', 'password' ) }}"
|
||||||
|
tags: always
|
||||||
|
|
||||||
|
- name: get archive
|
||||||
get_url:
|
get_url:
|
||||||
url: https://github.com/leenooks/phpLDAPadmin/archive/{{ pla_version }}.tar.gz
|
url: https://github.com/leenooks/phpLDAPadmin/archive/{{ pla_version }}.tar.gz
|
||||||
dest: /tmp/pla_{{pla_version }}.gz
|
dest: /tmp/pla_{{pla_version }}.gz
|
||||||
- yum:
|
|
||||||
|
- package:
|
||||||
name: [ php-ldap, php-xml ]
|
name: [ php-ldap, php-xml ]
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
@@ -18,10 +25,7 @@
|
|||||||
- template:
|
- template:
|
||||||
src: pla_config.php
|
src: pla_config.php
|
||||||
dest: /{{ pla_install_dir }}/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
|
- name: deploy apache config
|
||||||
template:
|
template:
|
||||||
src: pla_httpd.conf
|
src: pla_httpd.conf
|
||||||
|
|||||||
@@ -283,14 +283,14 @@ $servers->newServer('ldap_pla');
|
|||||||
|
|
||||||
/* A convenient name that will appear in the tree viewer and throughout
|
/* A convenient name that will appear in the tree viewer and throughout
|
||||||
phpLDAPadmin to identify this LDAP server to users. */
|
phpLDAPadmin to identify this LDAP server to users. */
|
||||||
$servers->setValue('server','name','localhost');
|
$servers->setValue('server','name','{{ pla_ldap_server }}');
|
||||||
|
|
||||||
/* Examples:
|
/* Examples:
|
||||||
'ldap.example.com',
|
'ldap.example.com',
|
||||||
'ldaps://ldap.example.com/',
|
'ldaps://ldap.example.com/',
|
||||||
'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
|
'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
|
||||||
(Unix socket at /usr/local/var/run/ldap) */
|
(Unix socket at /usr/local/var/run/ldap) */
|
||||||
$servers->setValue('server','host','127.0.0.1');
|
$servers->setValue('server','host','{{ pla_ldap_server }}');
|
||||||
|
|
||||||
/* The port your LDAP server listens on (no quotes). 389 is standard. */
|
/* The port your LDAP server listens on (no quotes). 389 is standard. */
|
||||||
// $servers->setValue('server','port',389);
|
// $servers->setValue('server','port',389);
|
||||||
|
|||||||
Reference in New Issue
Block a user