46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
---
|
|
- name: create replication account
|
|
community.general.ldap_entry:
|
|
dn: "{{ ldap_replication_account_dn }}"
|
|
objectClass: person
|
|
attributes:
|
|
sn: "Replication"
|
|
userPassword: "{{ ldap_replication_password }}"
|
|
args: "{{ ldap_auth }}"
|
|
|
|
- name: check wether module is already loaded
|
|
command: ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b cn=config objectClass=olcModuleList olcmoduleload
|
|
register: ldap_result
|
|
|
|
- name: add syncprov overlay module
|
|
community.general.ldap_entry:
|
|
dn: cn=module,cn=config
|
|
objectClass: olcModuleList
|
|
attributes:
|
|
cn: module
|
|
olcModuleLoad: syncprov.la
|
|
when: '"syncprov.la" not in ldap_result.stdout'
|
|
|
|
- name: add syncprov overlay config
|
|
community.general.ldap_entry:
|
|
dn: olcOverlay=syncprov,{{ ldap_database }}
|
|
objectClass: olcSyncProvConfig
|
|
attributes:
|
|
olcOverlay: syncprov
|
|
olcSpCheckpoint: 100 10
|
|
olcSpSessionLog: 200
|
|
|
|
- name: configure serverid
|
|
community.general.ldap_attrs:
|
|
dn: cn=config
|
|
attributes:
|
|
olcServerId: "{{ ldap_replication_server_id|default(42) }}"
|
|
|
|
- name: add indexes for replication
|
|
community.general.ldap_attrs:
|
|
dn: "{{ ldap_database }}"
|
|
attributes:
|
|
olcDbIndex:
|
|
- entryUUID eq
|
|
- entryCSN eq
|