---
- name: Install all critical and security updates
  hosts: all
  win_updates:
    category_names:
    - CriticalUpdates
    - SecurityUpdates
    state: installed
  register: update_result

- name: Reboot host if required
  win_reboot:
  when: update_result.reboot_required




but getting this


ERROR! 'win_updates' is not a valid attribute for a Play

The error appears to be in 
'/home/tony/windows/install_windows_updates.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: Install all critical and security updates
  ^ here

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ad2e6e39-2858-42dc-836a-9edb29f22736%40googlegroups.com.

Reply via email to