up version

This commit is contained in:
2023-10-12 15:37:29 +02:00
parent b1d9902c8c
commit 48ce7ce78c
5 changed files with 26 additions and 13 deletions

View File

@@ -3,6 +3,8 @@ Role Name
Quick and dirty playbook to install phpldapadmin
We are using leenooks' fork
Requirements
------------
@@ -13,7 +15,12 @@ Role Variables
pla_baseddn
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
------------

1
TODO Normal file
View File

@@ -0,0 +1 @@
if ldap dn and password is set: create user on server first

View File

@@ -1,4 +1,5 @@
---
# defaults file for phpldapadmin
pla_version: 1.2.6.2
pla_install_dir: /var/www/html/
pla_version: 1.2.6.4
pla_install_dir: /var/www/html/
pla_ldap_server: localhost

View File

@@ -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:
url: https://github.com/leenooks/phpLDAPadmin/archive/{{ pla_version }}.tar.gz
dest: /tmp/pla_{{pla_version }}.gz
- yum:
url: https://github.com/leenooks/phpLDAPadmin/archive/{{ pla_version }}.tar.gz
dest: /tmp/pla_{{pla_version }}.gz
- package:
name: [ php-ldap, php-xml ]
state: present
@@ -18,10 +25,7 @@
- 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

View File

@@ -283,14 +283,14 @@ $servers->newServer('ldap_pla');
/* A convenient name that will appear in the tree viewer and throughout
phpLDAPadmin to identify this LDAP server to users. */
$servers->setValue('server','name','localhost');
$servers->setValue('server','name','{{ pla_ldap_server }}');
/* Examples:
'ldap.example.com',
'ldaps://ldap.example.com/',
'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
(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. */
// $servers->setValue('server','port',389);