You've already forked ansible-role-common
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
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_region:
|
|
location: 183
|
|
format: en-NZ
|
|
unicode_language: en-NZ
|
|
copy_settings: true
|
|
|
|
- name: Ensure DNS is set
|
|
win_dns_client:
|
|
adapter_names: "*"
|
|
ipv4_addresses: "{{ dns_servers }}"
|
|
|
|
- name: Ensure domain is joined
|
|
win_ad_domain:
|
|
admin_user: "{{ vault_ad_username }}"
|
|
admin_password: "{{ vault_ad_password }}"
|
|
domain_name: "{{ authconfig_domain }}"
|
|
when: ad_domain_joined
|
|
notify: reboot windows
|
|
- meta: flush_handlers
|
|
|
|
- name: Ensure Temp dir exists
|
|
win_file:
|
|
path: 'C:\temp'
|
|
state: directory
|
|
|
|
#- name: Ensure Profile Tool Present
|
|
# win_copy:
|
|
# src: Defprof.exe
|
|
# dest: 'C:\temp\Defprof.exe'
|
|
|
|
#- name: Ensure user locale set
|
|
# win_command: 'c:\temp\Defprof.exe {{ ansible_user }} /q'
|
|
# changed_when: false
|
|
|
|
- name: Apply Windows Updates
|
|
win_updates:
|
|
when: apply_windows_updates
|
|
notify: reboot windows
|
|
- meta: flush_handlers
|
|
|
|
- name: Ensure default applications installed
|
|
win_chocolatey:
|
|
name: "{{ item }}"
|
|
state: present
|
|
with_items: "{{ win_packages }}"
|
|
|