Files
ansible_new_ldap_user/tasks/main.yml
2025-09-17 11:36:24 +02:00

22 lines
489 B
YAML

---
- name: "add ldap ou ou={{ org }},{{ ldap_base }}"
community.general.ldap_entry:
dn: "ou={{ org }},{{ ldap_base }}"
bind_dn: "{{ ldap_binddn }}"
bind_pw: "{{ ldap_bindpwd }}"
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 }}"