13 lines
391 B
YAML
13 lines
391 B
YAML
---
|
|
- name: Check if product key is defined
|
|
ansible.builtin.fail:
|
|
msg: Plese define windows product key
|
|
when: windows_product_key == 'undefined'
|
|
|
|
- name: Set windows product key
|
|
ansible.windows.win_powershell:
|
|
script: 'cscript.exe "slmgr.vbs" /ipk {{ windows_product_key }}'
|
|
|
|
- name: Akivate Windows
|
|
ansible.windows.win_powershell:
|
|
script: "cscript.exe 'slmgr.vbs' /ato"
|