Update roles

This commit is contained in:
2021-06-29 22:10:31 -04:00
parent dfe9dea2ca
commit caf10019e2
45 changed files with 156 additions and 739 deletions

View File

@@ -0,0 +1,32 @@
---
- name: check if powershell is available
raw: 'Get-Host'
failed_when: False
check_mode: no
register: check_powershell
- block:
- name: enable powershell
raw: '{{ item }}'
args:
executable: cmd.exe
changed_when: False
check_mode: no
loop:
- dism /online /enable-feature /featurename:NetFx2-ServerCore
- dism /online /enable-feature /featurename:MicrosoftWindowsPowerShell
- dism /online /enable-feature /featurename:ServerManager-PSH-Cmdlets
- name: reboot system
raw: shutdown /r /t 5
args:
executable: cmd.exe
changed_when: False
check_mode: no
- pause:
seconds: 30
when:
- check_powershell.stderr is defined
- ('is not recognized' in check_powershell.stderr)