Skip to content

Commit 78629d6

Browse files
David Coutadeurdavidcoutadeur
David Coutadeur
authored andcommitted
update ansible role for compatibility with OpenLDAP 2.5 (#16)
1 parent 871776b commit 78629d6

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ If you want the certificates to be deployed by ansible, you can enable it by add
7373
ldaptoolbox_openldap_deploy_certificates: true
7474
```
7575

76+
You can also configure the OpenLDAP version to install. Currently, only 2.5 and 2.6 are supported. The default is 2.6. You can change this in your playbook with:
77+
78+
```
79+
ldaptoolbox_openldap_version: "2.5"
80+
```
81+
7682

7783
Give a look at `playbook/group_vars/prod.yml`, `playbook/host_vars/master1.yml` and `playbook/host_vars/master2.yml` for variable customization
7884
You can also use `--extra-vars variable=value` at the command line for overloading any variable.

defaults/main.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Defaults variables for OpenLDAP role
44
################################################################################
55

6+
# default OpenLDAP version
7+
ldaptoolbox_openldap_version: "2.6"
8+
69
# Deploy certificate
710
ldaptoolbox_openldap_deploy_certificates: false
811

@@ -12,7 +15,7 @@ ldaptoolbox_openldap_apt_key_url: "https://ltb-project.org/documentation/_static
1215
ldaptoolbox_openldap_apt_key_id: "3FC3FD92ABA3975D2BEB95A70AC51F926D45BFC5"
1316
ldaptoolbox_openldap_apt_repo_filename: "ltb-project-openldap"
1417
ldaptoolbox_openldap_apt_keyrings_path: /usr/share/keyrings
15-
ldaptoolbox_openldap_apt_repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/ltb-project-openldap.gpg] http://ltb-project.org/debian/openldap26/bookworm bookworm main"
18+
ldaptoolbox_openldap_apt_repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/ltb-project-openldap.gpg] http://ltb-project.org/debian/openldap{{ '25' if ldaptoolbox_openldap_version == '2.5' else '26' }}/bookworm bookworm main"
1619
ldaptoolbox_openldap_apt_validate_certs: "true"
1720

1821
# Packages

tasks/ldaptoolbox-repository.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
content: |
3636
[ltb-project]
3737
name=LTB project packages
38-
baseurl=https://ltb-project.org/rpm/openldap26/$releasever/$basearch
38+
baseurl=https://ltb-project.org/rpm/openldap{{ '25' if ldaptoolbox_openldap_version == '2.5' else '26' }}/$releasever/$basearch
3939
enabled=1
4040
gpgcheck=1
4141
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LTB-project-security

templates/var/backups/openldap/config.ldif

+3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ olcIndexHash64: FALSE
2121
olcIndexIntLen: 4
2222
olcListenerThreads: 1
2323
olcLocalSSF: 71
24+
{% if ldaptoolbox_openldap_version == '2.5' %}
25+
{% else %}
2426
olcLogFile: {{ ldaptoolbox_openldap_olcLogFile }}
2527
olcLogFileOnly: TRUE
2628
olcLogFileRotate: {{ ldaptoolbox_openldap_olcLogFileRotate }}
29+
{% endif %}
2730
olcLogLevel: {{ ldaptoolbox_openldap_olcLogLevel }}
2831
olcMaxFilterDepth: 1000
2932
olcPidFile: /usr/local/openldap/var/run/slapd.pid

0 commit comments

Comments
 (0)