Change for new password input method

This commit is contained in:
abrown38 committed 2025-03-20 12:24:18 +00:00
1 parent 7ba59fa98b
commit c5ab7f7772
3 files changed
+6 -25

No files matched your search

-1
View File
@@ -9,7 +9,6 @@
wazuh_server: 10.22.10.200 wazuh_server: 10.22.10.200
wazuh_url: https://packages.wazuh.com/4.x/windows wazuh_url: https://packages.wazuh.com/4.x/windows
wazuh_msi: wazuh-agent-4.7.2-1.msi wazuh_msi: wazuh-agent-4.7.2-1.msi
ansible_password: "{{ vm_password }}"
tasks: tasks:
- name: Wazuh Agent - name: Wazuh Agent
tags: tags:
+4 -23
View File
@@ -1,28 +1,13 @@
--- ---
- name: Password
tags:
- password
- password_check
- always
block:
- name: Check for pending password status
set_fact:
ansible_password: "{{ vm_initial_password }}"
run_once: true
when: password_status == 'pending' or
password_status == 'change'
- name: Check for finished or change password status
set_fact:
ansible_password: "{{ vm_password }}"
run_once: true
when: password_status == 'finished'
- name: wait for connention to VM - name: wait for connention to VM
ansible.builtin.wait_for_connection: ansible.builtin.wait_for_connection:
delay: 10 delay: 10
timeout: 600 timeout: 600
any_errors_fatal: true any_errors_fatal: true
tags:
- password
- password_check
- always
- name: Set WinRM to delayed startup - name: Set WinRM to delayed startup
ansible.windows.win_service: ansible.windows.win_service:
@@ -30,10 +15,6 @@
start_mode: delayed start_mode: delayed
tags: winrm_delayed tags: winrm_delayed
- name: Reboot VMs before continuing
win_reboot:
tags: never
- name: Remove Local Admin - name: Remove Local Admin
tags: tags:
- remove_admin - remove_admin
Regular → Executable
+2 -1
View File
@@ -10,5 +10,6 @@ for ((i=1;i<=END;i++)); do
PASSWORD+="${WORD}-" PASSWORD+="${WORD}-"
done done
PASSWORD+=$RANDOM NUMBERS=$(($RANDOM % 10))$(($RANDOM % 10))$(($RANDOM % 10))$(($RANDOM % 10))
PASSWORD+=$NUMBERS
printf "$PASSWORD" printf "$PASSWORD"