- name: "Create LDIF files at {{ openldap_ldif_host_path }}{{ folder }}"
  template:
    src: "{{ item }}"
    dest: "{{ openldap_ldif_host_path }}{{ folder }}/{{ item | basename | regex_replace('\\.j2$', '') }}"
    mode: "0770"
  loop: >-
    {{
      lookup('fileglob', role_path ~ '/templates/ldif/' ~ folder ~ '/*.j2', wantlist=True)
      | sort
    }}
  notify: "Import {{ folder }} LDIF files"