ansible-roles/openldap-server/tasks/openldap_master_setup.yml

17 lines
637 B
YAML
Raw Normal View History

---
- block:
- name: Install the ldif that activates the accesslog db
template: src=syncprov.ldif.j2 dest=/etc/ldap/schema/syncprov.ldif
- name: Create the accesslog directory
file: dest=/var/lib/ldap/accesslog state=directory owner=openldap group=openldap
- name: Install the accesslog and syncprov configuration
shell: ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/{{ item }} ; touch /etc/ldap/schema/.{{ item }}.installed
args:
creates: '/etc/ldap/schema/{{ item }}.installed'
with_items: syncprov.ldif
tags: [ 'ldap', 'openldap', 'ldap_master', 'ldap_conf' ]
when: openldap_master