j1ngk3.ldap
Ansible Role: ldap
This Ansible Role installs Open LDAP (slapd) on selected nodes and sets up the structure and permissions needed to identify users and services across multiple domains on Linux.
Requirements
You need python-ldap
. Check prepare.yml for an example of how to install it.
Role Variables
You should define organizations
in your playbook or inventory as an array of domain names. The role will then create the directory structure for all the specified domains.
To create a slapd compatible password, run:
slappasswd -s password
and set ldap_password
to the generated output.
Dependencies
There are no dependencies.
Example Playbook
# playbook.yml
---
- name: Setup LDAP
hosts: all
become: yes
vars:
organizations:
- example.com
roles:
- ldap
# LDAP Structure
dc=ldap
├─ ou=admin
├─ ou=services
└─ dc=example.com
├─ ou=groups
└─ ou=users
License
MIT
Author Information
This role was created in 2017 by Pavel Žák and was forked in 2022 by j1ngk3.