Skip to content
README.rst 1.46 KiB
Newer Older
nimrod's avatar
nimrod committed
ansible-openldap
nimrod's avatar
nimrod committed
################
nimrod's avatar
nimrod committed

Ansible role for installing OpenLDAP, phpLDAPadmin and daily backup.

Requirements
------------

- Debian Jessie.

Role Variables
--------------

::
    openldap_organization: '{{ ansible_domain }}' #Organization name, defaults to the domain name.
    openldap_domain: '{{ ansible_domain }}' #LDAP domain, converted to ldap formatted. Defaults to the domain name of the machine.
    openldap_basedn: #LDAP base distinguished name, defaults to machine's domain converted to LDAP format.
    openldap_password: #Password for admin account, must be set.
nimrod's avatar
nimrod committed

Dependencies
------------

None.

Example Playbook
----------------

::
nimrod's avatar
nimrod committed
    - hosts: servers
      roles:
nimrod's avatar
nimrod committed
         - ansible-openldap
nimrod's avatar
nimrod committed

License
-------

MIT

Author Information
------------------

Nimrod Adar.

Restore procedure
-----------------

Deleting existing basedn: ::
nimrod's avatar
nimrod committed
    ldapdelete -Y EXTERNAL -r #Run as root, no password needed.
    ldapdelete -rxWD "cn=admin,dc=example,dc=com" #Run as any user, asks for OpenLDAP admin password.
nimrod's avatar
nimrod committed

Restoring from backup: ::
nimrod's avatar
nimrod committed
    ldapadd -Y EXTERNAL -f backup.ldif #Run as root, no password needed.
    ldapadd -xWD "cn=admin,dc=example,dc=com -f backup.ldif #Run as any user, asks for OpenLDAP admin password.
nimrod's avatar
nimrod committed

TODO
----

nimrod's avatar
nimrod committed
- ldapadd/ modify import of ldaps.ldif fails (and ldaps is unavailable as a
  result).
nimrod's avatar
nimrod committed
- Log to syslog (Apache as well).
- Metrics (also Apache).
nimrod's avatar
nimrod committed
- Testing (ldaps, backup and restore).
nimrod's avatar
nimrod committed
- Remove all preseeding, configure via ldap modules.