From 12f3f1cc5dc94ab4bd34b521629d01f059752a62 Mon Sep 17 00:00:00 2001 From: Todd Ruch Date: Mon, 16 Jun 2025 09:48:12 -0400 Subject: [PATCH] init --- windows/change_ad_user_pass.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 windows/change_ad_user_pass.yml diff --git a/windows/change_ad_user_pass.yml b/windows/change_ad_user_pass.yml new file mode 100644 index 0000000..10dd17b --- /dev/null +++ b/windows/change_ad_user_pass.yml @@ -0,0 +1,16 @@ +--- +- 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