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.

README.md 2.0KB

6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Deploy OpenLDAP/FusionDirectory using Ansible
  2. These playbooks will deploy an OpenLDAP/FusionDirectory server.
  3. Components:
  4. * OpenLDAP (slapd)
  5. * FusionDirectory
  6. * Apache
  7. * GnuTLS (Internal CA)
  8. ## Prerequisites
  9. * An Ubuntu 18.04 LXD machine.
  10. * The *python-minimal* package needs to be present.
  11. * SSH Public key authentication from the Ansible host, to the mailserver.
  12. ## Clone the repository
  13. Clone the reposiroty:
  14. ```
  15. $ git clone https://git.theo-andreou.org/Personal/ansible-deploy-ldap-fusiondirectory.git
  16. $ cd ansible-deploy-ldap-fusiondirectory
  17. ```
  18. ## Create the vars files
  19. ### Create the vars/all.yml file
  20. * Create a *vars/all.yml* file with similar content (you can use *vars/all.yml.example* as reference):
  21. ```
  22. domain: example.org
  23. organization: Example LTD
  24. description: example
  25. base_dn: dc=example,dc=org
  26. locality: Limassol
  27. state: Limassol
  28. country: CY
  29. allowed_ips:
  30. - 192.168.0.0/24
  31. - 10.0.0.0/24
  32. language: en_US
  33. timezone: Asia/Nicosia
  34. ```
  35. ### Create the vars/secrets.yml filr
  36. * Create an encrypted *vars/secrets.yml* file:
  37. ```
  38. $ ansible-vault create vars/secrets.yml
  39. ```
  40. Use a master password for the file above.
  41. * Create this content:
  42. ```
  43. ldap_admin_dn: cn=admin,dc=example,dc=org
  44. ldap_admin_pass: MySecretLDAPCombination
  45. fd_admin: fdadmin
  46. fd_admin_pass: MySecretFDCombination
  47. ```
  48. ## Deploy LDAP and FusionDirectory
  49. When done with the configuration run this command (provide your master password):
  50. ```
  51. $ ansible-playbook --vault-id @prompt deploy_fusiondirectory.yml
  52. ```
  53. When done visit http://auth.example.org to login for the first time. I suggest you enable HTTPS before doing that.
  54. References
  55. ----------
  56. * https://docs.ansible.com/ansible/latest/modules/debconf_module.html
  57. * https://unix.stackexchange.com/questions/126136/how-to-check-debconf-selections-of-a-non-installed-package
  58. * https://serverfault.com/questions/679693/how-do-i-make-ansible-actually-compile-a-config-file-having-changed-my-debconf-s
  59. * https://docs.ansible.com/ansible/latest/modules/template_module.html