version 3.6
This commit is contained in:
@@ -1,19 +1,11 @@
|
|||||||
- name: Patch Domain Controllers via JEA
|
|
||||||
hosts: domain_controllers
|
|
||||||
gather_facts: no
|
|
||||||
tasks:
|
|
||||||
- name: Get available updates
|
|
||||||
win_shell: |
|
|
||||||
Invoke-Command -ConfigurationName DCMaintenance -ScriptBlock { Get-WindowsUpdate }
|
|
||||||
|
|
||||||
- name: Install updates
|
- name: Get available updates
|
||||||
win_shell: |
|
win_powershell: Get-WindowsUpdate
|
||||||
Invoke-Command -ConfigurationName DCMaintenance -ScriptBlock { Install-WindowsUpdate -AcceptAll -AutoReboot }
|
- name: Install updates
|
||||||
|
win_powershell: Install-WindowsUpdate -AcceptAll -AutoReboot
|
||||||
|
|
||||||
- name: Get update history
|
- name: Get update history
|
||||||
win_shell: |
|
win_powershell: Get-WUHistory
|
||||||
Invoke-Command -ConfigurationName DCMaintenance -ScriptBlock { Get-WUHistory }
|
- name: Restart domain controller
|
||||||
|
win_powershell: Restart-Computer -Force
|
||||||
|
|
||||||
- name: Restart domain controller
|
|
||||||
win_shell: |
|
|
||||||
Invoke-Command -ConfigurationName DCMaintenance -ScriptBlock { Restart-Computer -Force }
|
|
||||||
|
|||||||
Reference in New Issue
Block a user