Skip to content

Commit

Permalink
fix(): do not use changelog5 on RHEL8 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
rgroux committed Dec 19, 2022
1 parent c0b5234 commit 3e67ddf
Showing 1 changed file with 34 additions and 31 deletions.
65 changes: 34 additions & 31 deletions tasks/configure_changelog.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
---
- name: Create changelog configuration entry
ldap_entry:
server_uri: "{{ dirsrv_server_uri }}"
validate_certs: "{{ dirsrv_tls_certificate_trusted }}"
start_tls: "{{ dirsrv_use_starttls }}"
bind_dn: "{{ dirsrv_rootdn }}"
bind_pw: "{{ dirsrv_rootdn_password }}"
dn: "cn=changelog5,cn=config"
objectClass:
- top
- extensibleObject
attributes:
cn: "changelog5"
# Fails if this is not set, although it's not a MUST attribute
# (but there's dark magic taking place with extensibleObject)
nsslapd-changelogdir: "/var/lib/dirsrv/slapd-{{ dirsrv_serverid }}/changelogdb"
state: present
- name: Determine if we need to use "cn=changelog5,cn=config" or not
block:
- name: Create changelog configuration entry
ldap_entry:
server_uri: "{{ dirsrv_server_uri }}"
validate_certs: "{{ dirsrv_tls_certificate_trusted }}"
start_tls: "{{ dirsrv_use_starttls }}"
bind_dn: "{{ dirsrv_rootdn }}"
bind_pw: "{{ dirsrv_rootdn_password }}"
dn: "cn=changelog5,cn=config"
objectClass:
- top
- extensibleObject
attributes:
cn: "changelog5"
# Fails if this is not set, although it's not a MUST attribute
# (but there's dark magic taking place with extensibleObject)
nsslapd-changelogdir: "/var/lib/dirsrv/slapd-{{ dirsrv_serverid }}/changelogdb"
state: present

- name: Configure changelog
ldap_attrs:
server_uri: "{{ dirsrv_server_uri }}"
validate_certs: "{{ dirsrv_tls_certificate_trusted }}"
start_tls: "{{ dirsrv_use_starttls }}"
bind_dn: "{{ dirsrv_rootdn }}"
bind_pw: "{{ dirsrv_rootdn_password }}"
dn: "cn=changelog5,cn=config"
name: "{{ item.name }}"
values: "{{ item.value }}"
state: exact
attributes:
nsslapd-changelogdir: "/var/lib/dirsrv/slapd-{{ dirsrv_serverid }}/changelogdb"
nsslapd-changelogmaxage: "{{ dirsrv_changelog_max_age }}"
- name: Configure changelog
ldap_attrs:
server_uri: "{{ dirsrv_server_uri }}"
validate_certs: "{{ dirsrv_tls_certificate_trusted }}"
start_tls: "{{ dirsrv_use_starttls }}"
bind_dn: "{{ dirsrv_rootdn }}"
bind_pw: "{{ dirsrv_rootdn_password }}"
dn: "cn=changelog5,cn=config"
name: "{{ item.name }}"
values: "{{ item.value }}"
state: exact
attributes:
nsslapd-changelogdir: "/var/lib/dirsrv/slapd-{{ dirsrv_serverid }}/changelogdb"
nsslapd-changelogmaxage: "{{ dirsrv_changelog_max_age }}"
when: "ansible_facts['distribution_major_version'] | int >= 8"

0 comments on commit 3e67ddf

Please sign in to comment.