Files
ansible-role-common/tasks/Windows.yml

40 lines
949 B
YAML

---
- name: Set Timezone
win_timezone:
timezone: "New Zealand Standard Time"
- name: Ensure Administrator password
win_user:
name: administrator
password: "{{ vault_windows_admin_pwd }}"
password_never_expires: yes
state: present
update_password: always
changed_when: false
- name: Ensure System Culture Set
win_locale:
culture: en-NZ
- name: Ensure DNS is set
win_dns:
dns1: "{{ dns_servers[0] }}"
dns2: "{{ dns_servers[1] }}"
- name: Ensure domain is joined
win_ad_domain:
admin_user: "{{ ad_admin_username }}"
admin_password: "{{ ad_admin_password }}"
domain_name: "{{ ad_domain_name }}"
when: ad_domain_joined
notify: reboot windows
- meta: flush_handlers
- name: Ensure Profile Tool Present
win_copy:
src: Defprof.exe
dest: "C:\\temp\\DefProf.exe"
- name: Set default user locale
win_command: "c:\\temp\\Defprof.exe Administrator"
changed_when: false