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

@@ -1,2 +1,2 @@
install_date: Wed May 5 16:14:01 2021
install_date: Wed Jun 30 01:12:46 2021
version: master

View File

@@ -29,8 +29,8 @@
arguments: '/qb!'
register: install_visual_c
until: install_visual_c is success
delay: 3
retries: 5
delay: 10
retries: 60
when: "'Windows Server 2008' in ansible_distribution"
- name: stop windows update service

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)

View File

@@ -20,7 +20,7 @@
ignore_errors: yes
- name: create a scheduled task to install hotfix
raw: SCHTASKS /Create /SC MONTHLY /MO first /D SUN /TN hotfix_install /TR "{{ enable_tls_support_hotfix_download_location }}\\{{ enable_tls_support_hotfix.file }} /quiet /norestart"
raw: SCHTASKS /Create /SC MONTHLY /MO first /D SUN /TN hotfix_install /TR "{{ enable_tls_support_hotfix_download_location }}\\{{ enable_tls_support_hotfix.file }} /quiet /restart"
args:
executable: cmd.exe
changed_when: False
@@ -34,7 +34,7 @@
check_mode: no
- pause:
seconds: 30
seconds: 60
- name: delete scheduled task (hotfix)
raw: 'SCHTASKS /Delete /TN hotfix_install /f'

View File

@@ -1,5 +1,7 @@
---
- include_tasks: enable_powershell.yml
- include_tasks: enable_tls_system_default.yml
- name: download script

View File

@@ -40,7 +40,7 @@
- name: wait for system to reboot after fix
wait_for_connection:
delay: 240
delay: 300
sleep: 30
timeout: 300