Version information
This version is compatible with:
- Puppet Enterprise 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >=4.10.0 <6.7.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'spantree-phpldapadmin', '0.2.0'
Learn more about managing modules with a PuppetfileDocumentation
phpldapadmin
Sebastian Otaegui feniix@gmail.com
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with phpldapadmin
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
The phpldapadmin module installs and configures phpldapadmin.
Module Description
This module installs phpldapadmin, and sets up the file '/etc/phpldapadmin/config.php' with provided user/password and hostname.
Setup
What phpldapadmin affects
- Install the
phpldapadmin
package. - Modify the file
/etc/phpldapadmin/config.php
with custom values.
Beginning with phpldapadmin
puppet module install spantree-phpldapadmin
and follow the instructions specified on the Usage section.
Usage
class { 'phpldapadmin':
ldap_host => 'localhost',
ldap_suffix => 'dc=domain,dc=tld',
ldap_bind_id => 'cn=admin,dc=domain,dc=tld',
ldap_bind_pass => 'password',
extraconf => "
\$servers->newServer('ldap_pla');
\$servers->SetValue('server','name','LDAP MyDomain (slave)');
\$servers->SetValue('server','host','ldap2.mydomain.org');
\$servers->SetValue('server','port','389');
\$servers->SetValue('server','base',array('dc=mydomain,dc=org','cn=config'));
\$servers->SetValue('login','auth_type','session');
\$servers->SetValue('login','bind_id','cn=admin,dc=mydomain,dc=org');
\$servers->SetValue('server','tls',false);
\$servers->SetValue('appearance','password_hash','crypt');
\$servers->SetValue('server','read_only',false);
\$servers->SetValue('appearance','show_create',true);
\$servers->SetValue('auto_number','enable',false);"
}
or in hiera
---
phpldapadmin::extraconf : |
$servers->newServer('ldap_pla');
$servers->SetValue('server','name','LDAP MyDomain (slave)');
$servers->SetValue('server','host','ldap2.mydomain.org');
$servers->SetValue('server','port','389');
$servers->SetValue('server','base',array('dc=mydomain,dc=org','cn=config'));
$servers->SetValue('login','auth_type','session');
$servers->SetValue('login','bind_id','cn=admin,dc=mydomain,dc=org');
$servers->SetValue('server','tls',false);
$servers->SetValue('appearance','password_hash','crypt');
$servers->SetValue('server','read_only',false);
$servers->SetValue('appearance','show_create',true);
$servers->SetValue('auto_number','enable',false);
To use the module with CentOS you need to add the EPEL
repository, one way to do that is to use the module stahnma/epel
.
Reference
Public classes
Private classes
-
phpldapadmin::config: writes the file
/etc/phpldapadmin/config.php
with proper values. -
phpldapadmin::package: installs the package using the package manager.
###Class: phpldapadmin
This class is provided to do the basic setup tasks required for using phpldapadmin.
At the moment if does not take care of setting up a web server to serve the web pages.
####ldap_host
Parameter that controls the ldap the phpldapadmin needs to connect.
ldap_host
can either be an ipv4 address or a hostname.
####ldap_suffix
Parameter that controls the top level suffix for the ldap.
ldap_suffix
must be a string with the appropriate suffix.
####ldap_bind_id
Parameter that controls the id used to bind and manage the ldap.
ldap_bind_id
must be a user that has administrative access to the ldap server.
####ldap_bind_pass
Optional parameter that controls the password of the user specified in the ldap_bind_id
parameter.
If not specified, you wil be prompted for the password.
Limitations
This module has been tested on Ubuntu 14.04 and CentOS 6.5. It should also work on Debian/Ubuntu 12.04, RedHat/CentOS 7 and FreeBSD 10+.
At the moment it does not configure the phpldapadmin app with SASL.
Development
Use your favorite text editor (mine is vim) and run bundle exec rake test
to test, don't forget to bundle install
first.
Release Notes/Contributors/Etc
To do
Dependencies
- puppetlabs-stdlib (>=4.0.0 <7.0.0)
Copyright 2014 Sebastian Otaegui Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.