added group support

This commit is contained in:
2025-09-17 11:36:24 +02:00
parent 15914b17b7
commit 76fab810b0
3 changed files with 22 additions and 15 deletions

View File

@@ -1,18 +1,9 @@
---
# ansible-playbook /etc/ansible/Playbooks/new_ldap_user.yml -K --ask-vault-pass
# --extra-vars="file=account.csv"
- name: set some vars
ansible.builtin.set_fact:
binddn: "{{ lookup( 'viczem.keepass.keepass', 'opendoor/collidine_ldap_password', 'username' ) }}"
bindpwd: "{{ lookup( 'viczem.keepass.keepass', 'opendoor/collidine_ldap_password', 'password' ) }}"
tags: always
when: binddn is not defined
- name: "add ldap ou ou={{ org }},{{ ldap_base }}"
community.general.ldap_entry:
dn: "ou={{ org }},{{ ldap_base }}"
bind_dn: "{{ binddn }}"
bind_pw: "{{ bindpwd }}"
bind_dn: "{{ ldap_binddn }}"
bind_pw: "{{ ldap_bindpwd }}"
objectClass:
- organizationalUnit
- top