Files
ansible-role-common/tasks/Windows.yml
2017-03-15 13:14:05 +13:00

59 lines
1.3 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_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: "{{ 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 }}"