mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-15 21:33:05 +00:00
Refactor user variable name from OPERNLDAP_USERS to OPENLDAP_USERS and add dynamic state handling for objectClass cleanup.
See conversation: https://chatgpt.com/share/692cab28-1ce0-800f-81da-712c8ea08e5c
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
state: present # ↳ creates but never updates
|
||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||
loop: "{{ OPERNLDAP_USERS | dict2items }}"
|
||||
loop: "{{ OPENLDAP_USERS | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
attributes:
|
||||
objectClass: "{{ LDAP.USER.OBJECTS.STRUCTURAL }}"
|
||||
mail: "{{ item.value.email }}"
|
||||
state: exact
|
||||
state: "{{ 'exact' if MODE_CLEANUP else 'present' }}"
|
||||
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
|
||||
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
|
||||
loop: "{{ OPERNLDAP_USERS | dict2items }}"
|
||||
loop: "{{ OPENLDAP_USERS | dict2items }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user