An Ansible Playbook to deploy OpenLDAP and FusionDirectory
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Theodotos Andreou a9f8548378 Merge branch 'feature/role' of jmgarcialdemoral/ansible-deploy-ldap-fusiondirectory into master 4 years ago
handlers role instead of playbook 5 years ago
tasks role instead of playbook 5 years ago
templates Initial Commit 5 years ago
vars Initial Commit 5 years ago
LICENSE Initial Commit 5 years ago role instead of playbook 5 years ago

Deploy OpenLDAP/FusionDirectory using Ansible

These Role will deploy an OpenLDAP/FusionDirectory server.


  • OpenLDAP (slapd)
  • FusionDirectory
  • Apache
  • GnuTLS (Internal CA)


  • An Ubuntu 18.04 LXD machine.
  • The python-minimal package needs to be present.
  • SSH Public key authentication from the Ansible host, to the mailserver.

Clone the repository

Clone the repository:

$ git clone
$ cd ansible-deploy-ldap-fusiondirectory

Create the vars files

Create the vars/all.yml file

  • Create a vars/all.yml file with similar content (you can use vars/all.yml.example as reference):
organization: Example LTD
description: example
base_dn: dc=example,dc=org
locality: Limassol
state: Limassol
country: CY
language: en_US
timezone: Asia/Nicosia

Create the vars/secrets.yml filr

  • Create an encrypted vars/secrets.yml file:
$ ansible-vault create vars/secrets.yml

Use a master password for the file above.

  • Create this content:
ldap_admin_dn: cn=admin,dc=example,dc=org
ldap_admin_pass: MySecretLDAPCombination
fd_admin: fdadmin
fd_admin_pass: MySecretFDCombination
  • Create a playbook to call this role (fusiondirectory.yml):
- hosts: all
  become: yes
  gather_facts: false
    - ansible_user: "ubuntu"
    - name: install python 2
      raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
      changed_when: False
    - ansible-deploy-ldap-fusiondirectory

Deploy LDAP and FusionDirectory

When done with the configuration run this command (provide your master password):

$ ansible-playbook --vault-id @prompt fusiondirectory.yml

When done visit to login for the first time. I suggest you enable HTTPS before doing that.