2 Commits

Author SHA1 Message Date
Todd Ruch
666165b5b5 commit 2025-06-20 15:03:23 -04:00
Todd Ruch
12f3f1cc5d init 2025-06-16 09:48:12 -04:00

View File

@@ -0,0 +1,18 @@
---
- name: Create Active Directory domain
hosts: "{{ _hosts | default('os_windows') }}"
gather_facts: false
vars:
ad_user_name: "UserA" # Specify the user whose password you want to change
new_password: "{{ lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) }}"
tasks:
- name: Update user password in Active Directory
microsoft.ad.user:
name: "{{ ad_user_name }}"
password: "{{ new_password }}"
update_password: always
retries: 5
delay: 10
register: ad_user_update
until: ad_user_update is succeeded