random pass
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
- name: Create new domain in a new forest on the target host
|
||||
ansible.windows.win_domain:
|
||||
dns_domain_name: ansible.local
|
||||
safe_mode_password: "{{ ansible_password }}"
|
||||
safe_mode_password: "{{ lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) }}"
|
||||
register: new_forest
|
||||
|
||||
- name: Reboot the target host
|
||||
@@ -36,7 +36,7 @@
|
||||
community.windows.win_domain_user:
|
||||
name: "{{ item.name }}"
|
||||
groups: "{{ item.groups }}"
|
||||
password: "{{ ansible_password }}"
|
||||
password: "{{ lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1) }}"
|
||||
update_password: on_create
|
||||
loop:
|
||||
- { name: "UserA", groups: "GroupA" }
|
||||
|
||||
Reference in New Issue
Block a user