mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 11:27:21 +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
|
||||
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: Set KMS server
|
||||
ansible.windows.win_shell: cscript C:\Windows\System32\slmgr.vbs /skms activate.is.ed.ac.uk
|
||||
tags: set_kms
|
||||
|
||||
- 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}
|
||||
ansible.windows.win_shell: cscript C:\Windows\System32\slmgr.vbs /ipk {{ product_key }}
|
||||
tags: set_key
|
||||
|
||||
- name: Administrator Password
|
||||
tags:
|
||||
|
||||
Reference in new issue
Block a user