--- - name: "add ldap ou ou={{ org }},{{ ldap_base }}" community.general.ldap_entry: server_uri: "{{ nlu_ldap_uri }}" dn: "ou={{ org }},{{ nlu_ldap_base }}" bind_dn: "{{ nlu_ldap_binddn }}" bind_pw: "{{ nlu_ldap_bindpw }}" objectClass: - organizationalUnit - top - name: read csv file community.general.read_csv: path: '{{ file|default( "account.csv" ) }}' register: users delegate_to: localhost - include_tasks: ldap_user_inc.yml loop: "{{ users.list }}"