Missing groups tasks

This commit is contained in:
Jonathan DeMasi
2026-01-24 17:03:38 -07:00
parent f18df7a8d6
commit 16b86e616a
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
- name: Ensure LDAP groups exist
community.general.ldap_entry:
dn: "cn={{ item.name }},ou=Groups,{{ ldap_basedn }}"
state: present
objectClass:
- posixGroup
attributes:
cn: "{{ item.name }}"
gidNumber: "{{ item.gid }}"
loop: "{{ ldap_groups }}"
args:
server_uri: "{{ ldap_uri }}"
bind_dn: "{{ ldap_directory_bind_dn }}"
bind_pw: "{{ ldap_directory_bind_pw }}"
start_tls: yes