2016-11-15 00:01:06 +13:00
|
|
|
---
|
|
|
|
|
- name: Set Timezone
|
|
|
|
|
win_timezone:
|
|
|
|
|
timezone: "New Zealand Standard Time"
|
2016-11-22 13:29:18 +13:00
|
|
|
|
2016-07-26 14:30:49 +12:00
|
|
|
- name: Ensure Administrator password
|
|
|
|
|
win_user:
|
|
|
|
|
name: administrator
|
|
|
|
|
password: "{{ vault_windows_admin_pwd }}"
|
|
|
|
|
password_never_expires: yes
|
|
|
|
|
state: present
|
|
|
|
|
update_password: always
|
2016-08-19 00:03:53 +12:00
|
|
|
changed_when: false
|
2022-04-03 13:20:47 +12:00
|
|
|
|
2016-11-15 00:01:06 +13:00
|
|
|
- name: Ensure System Culture Set
|
2017-04-23 21:19:24 +12:00
|
|
|
win_region:
|
|
|
|
|
location: 183
|
|
|
|
|
format: en-NZ
|
|
|
|
|
unicode_language: en-NZ
|
|
|
|
|
copy_settings: true
|
2022-04-03 13:20:47 +12:00
|
|
|
|
2016-08-19 00:03:53 +12:00
|
|
|
- name: Ensure DNS is set
|
2017-03-24 09:55:09 +13:00
|
|
|
win_dns_client:
|
|
|
|
|
adapter_names: "*"
|
2017-04-23 21:33:55 +12:00
|
|
|
ipv4_addresses: "{{ dns_servers }}"
|
2016-09-08 10:58:21 +12:00
|
|
|
|
|
|
|
|
- name: Ensure domain is joined
|
|
|
|
|
win_ad_domain:
|
2017-03-14 10:43:20 +13:00
|
|
|
admin_user: "{{ vault_ad_username }}"
|
|
|
|
|
admin_password: "{{ vault_ad_password }}"
|
|
|
|
|
domain_name: "{{ authconfig_domain }}"
|
2016-09-08 10:58:21 +12:00
|
|
|
when: ad_domain_joined
|
2023-10-08 22:34:46 +13:00
|
|
|
notify: Reboot Windows
|
2016-11-22 12:28:24 +13:00
|
|
|
- meta: flush_handlers
|
|
|
|
|
|
2018-06-27 10:02:57 +12:00
|
|
|
- name: Ensure Important dirs exist
|
2017-03-14 10:43:20 +13:00
|
|
|
win_file:
|
2018-06-27 10:02:57 +12:00
|
|
|
path: "{{ item }}"
|
2017-03-14 10:43:20 +13:00
|
|
|
state: directory
|
2018-06-27 10:02:57 +12:00
|
|
|
with_items:
|
|
|
|
|
- 'C:\Temp'
|
|
|
|
|
- 'C:\Tools'
|
2022-04-03 13:20:47 +12:00
|
|
|
|
2017-04-23 22:32:37 +12:00
|
|
|
#- name: Ensure Profile Tool Present
|
|
|
|
|
# win_copy:
|
|
|
|
|
# src: Defprof.exe
|
|
|
|
|
# dest: 'C:\temp\Defprof.exe'
|
2017-03-14 10:43:20 +13:00
|
|
|
|
2017-03-15 13:13:38 +13:00
|
|
|
#- name: Ensure user locale set
|
|
|
|
|
# win_command: 'c:\temp\Defprof.exe {{ ansible_user }} /q'
|
|
|
|
|
# changed_when: false
|
2017-03-14 09:26:10 +13:00
|
|
|
|
|
|
|
|
- name: Apply Windows Updates
|
|
|
|
|
win_updates:
|
|
|
|
|
when: apply_windows_updates
|
2023-10-08 22:34:46 +13:00
|
|
|
notify: Reboot Windows
|
2017-03-14 09:26:45 +13:00
|
|
|
- meta: flush_handlers
|
|
|
|
|
|
2017-03-15 13:14:05 +13:00
|
|
|
- name: Ensure default applications installed
|
2016-11-22 13:29:18 +13:00
|
|
|
win_chocolatey:
|
|
|
|
|
name: "{{ item }}"
|
|
|
|
|
state: present
|
2017-03-14 09:26:10 +13:00
|
|
|
with_items: "{{ win_packages }}"
|