mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-30 01:06:51 +00:00
Activate windows on VMs
This commit is contained in:
1 parent
d44af34aaa
commit
07ef86be75
1 file changed
+5
-8
@@ -73,18 +73,15 @@
|
|||||||
|
|
||||||
- name: Activation
|
- name: Activation
|
||||||
tags:
|
tags:
|
||||||
- never
|
|
||||||
- activate_windows
|
- activate_windows
|
||||||
block:
|
block:
|
||||||
- name: Fix evaluation edition
|
- name: Set KMS server
|
||||||
ansible.windows.win_shell: DISM /online /Set-Edition:ServerStandard /ProductKey:{{ product_key }} /AcceptEula /Quiet
|
ansible.windows.win_shell: cscript C:\Windows\System32\slmgr.vbs /skms activate.is.ed.ac.uk
|
||||||
ignore_errors: true
|
tags: set_kms
|
||||||
retries: 2
|
|
||||||
|
|
||||||
- name: Activate Windows
|
- name: Activate Windows
|
||||||
ansible.windows.win_powershell:
|
ansible.windows.win_shell: cscript C:\Windows\System32\slmgr.vbs /ipk {{ product_key }}
|
||||||
script: |
|
tags: set_key
|
||||||
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
|
- name: Administrator Password
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
Reference in new issue
Block a user