From 685f271b764b4d11719303283003f89ce522b41b Mon Sep 17 00:00:00 2001 From: eturkmen <enes.tuerkmen@id.ethz.ch> Date: Tue, 9 Apr 2024 10:44:46 +0000 Subject: [PATCH] Update file Playbook-Test2.yaml --- Playbook-Test/Playbook-Test2.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Playbook-Test/Playbook-Test2.yaml b/Playbook-Test/Playbook-Test2.yaml index a068269..bc40f7f 100644 --- a/Playbook-Test/Playbook-Test2.yaml +++ b/Playbook-Test/Playbook-Test2.yaml @@ -2,21 +2,9 @@ - name: Windows Updates hosts: win tasks: - - name: Installiere kritische und Sicherheitsupdates + - name: Install critical and security updates ansible.windows.win_updates: category_names: '*' state: installed reboot: false - log_path: C:\ansible.txt - - - name: Überprüfe den Neustartstatus - win_shell: Get-WindowsUpdate -ComputerName localhost | Select-String -Pattern "reboot" - register: reboot_required - changed_when: false - ignore_errors: true - - - name: Zeige den Neustartstatus an - debug: - msg: "Neustart erforderlich: {{ reboot_required }}" - when: reboot_required is defined and reboot_required.stdout is search("reboot") - + log_path: C:\ansible.txt \ No newline at end of file -- GitLab