uZer.389dirsrv
ansible-role-389dirsrv
This role installs 389 Directory Server using the apt or yum package manager, sets up system limits for files and TCP ports, and installs/configures an LDAP instance. If the instance is already set up, it won’t change it; this role only handles the initial installation and LDAP setup.
You should define all settings in host_vars
or group_vars
. For a full list of available settings, check defaults/main.yml
. Any major system adjustments can be turned off based on your needs.
This role is inspired by the original role from CSCfi, found here, but it doesn't install RHEL and offers more options for customization.
Dependencies
Compatible with CentOS, Red Hat, Ubuntu, and Debian.
Parameters
Minimum Required Variables
## IN VAULT
vault_dirsrv_password: "<password>"
vault_dirsrv_admin_password: "<admin-password>"
## IN GROUP_VARS/HOST_VARS
dirsrv_server_id: "<instance fqdn>"
dirsrv_admin_domain: "<instance domain>"
dirsrv_suffix: "<dc=<instance domain>>"
Full Variable Definitions
# Control max open files in sysctl
dirsrv_manage_filemax: yes
# Control dynamic TCP ports > 1024 in sysctl
dirsrv_manage_tcp: yes
# Save config in LDAP (yes) or in directory (no)
dirsrv_config_in_ldap: yes
# Dirsrv installation details
dirsrv_server_id: "instance01"
dirsrv_admin_domain: "void"
dirsrv_suffix: "dc=void"
# If these 2 differ, LDAP will be a replica of the master
dirsrv_master_fqdn: "{{ ansible_fqdn }}"
dirsrv_local_fqdn: "{{ ansible_fqdn }}"
dirsrv_user: dirsrv
dirsrv_group: dirsrv
dirsrv_port: 389
dirsrv_service_name: dirsrv
dirsrv_package_state: installed
dirsrv_password: "{{ vault_dirsrv_password }}"
dirsrv_rootdn: "cn=Directory Manager"
dirsrv_admin_port: '9830'
dirsrv_admin_ip: '0.0.0.0'
dirsrv_admin_service_name: dirsrv-admin
dirsrv_admin_password: "{{ vault_dirsrv_admin_password }}"
# Additional variables for each OS:
dirsrv_packages: <this list should not be edited>
dirsrv_service_name: dirsrv
dirsrv_user: dirsrv
dirsrv_group: dirsrv
License
"THE (extended) BEER-WARE LICENSE" (Revision 42.0815):
You can do anything you want with this code as long as you keep this notice. If we meet and you think this code is valuable, feel free to buy me a beer!
Testing with Travis
Using the excellent test suite from geerlingguy.
Author Information
Youenn Piolet
ansible-galaxy install uZer.389dirsrv