Update roles
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
---
|
||||
|
||||
- include_tasks: enable_powershell.yml
|
||||
|
||||
- include_tasks: enable_tls_system_default.yml
|
||||
|
||||
- name: download script
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
- name: wait for system to reboot after fix
|
||||
wait_for_connection:
|
||||
delay: 240
|
||||
delay: 300
|
||||
sleep: 30
|
||||
timeout: 300
|
||||
|
||||
|
||||
Reference in New Issue
Block a user