added windows activation step (not working)

This commit is contained in:
abrown38 committed 2024-04-08 13:47:36 +00:00
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