- name: Check for updates hosts: windows tasks: - name: Check for updates. Log the needed updates. win_updates: state: searched category_name: - SecurityUpdates - CriticalUpdates - UpdateRollups #log_path: C:\ansible-Updates.txt register: updates - name: return report debug: var: updates