diff --git a/Playbook-Test/Playbook-Test2.yaml b/Playbook-Test/Playbook-Test2.yaml index b30fa9136be5acd064cb527d79c49351fcbbd63d..0de55d0e4f0c96b153f83855f1bf2bcbbbc11b19 100644 --- a/Playbook-Test/Playbook-Test2.yaml +++ b/Playbook-Test/Playbook-Test2.yaml @@ -1,8 +1,13 @@ --- -- name: Update Windows +- name: Windows Updates hosts: win - gather_facts: no - become_method: runas tasks: - - name: Install Updates - win_shell: Get-WindowsUpdate -AcceptAll -Install -IgnoreReboot \ No newline at end of file + - name: Install critical and security updates + ansible.windows.win_updates: + category_names: + - CriticalUpdates + - SecurityUpdates + state: installed + reboot: false + log_path: C:\ansible.txt + \ No newline at end of file