mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 14:07:21 +00:00
added windows activation step (not working)
This commit is contained in:
1 parent
7ac1c8d668
commit
77d0280a1f
1 file changed
+15
@@ -80,6 +80,21 @@
|
||||
timezone: GMT Standard Time
|
||||
tags: timezone
|
||||
|
||||
- name: Activation
|
||||
tags:
|
||||
- never
|
||||
- activate_windows
|
||||
block:
|
||||
- name: Fix evaluation edition
|
||||
ansible.windows.win_shell: DISM /online /Set-Edition:ServerStandard /ProductKey:{{ product_key }} /AcceptEula /Quiet
|
||||
ignore_errors: true
|
||||
retries: 2
|
||||
|
||||
- name: Activate Windows
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
invoke-command -computername {{ win_project }}-{{ inventory_hostname.split('-')[-1] }} -scriptblock { slmgr //b /upk ; slmgr //b /cpky ; slmgr //b /ipk {{ product_key }} ; slmgr //b /ato}
|
||||
|
||||
- name: Administrator Password
|
||||
tags:
|
||||
- password
|
||||
|
||||
Reference in new issue
Block a user