Mapping values are not allows in this context when trying to loop a playbook

I have created the below update_windows.yml playbook. I am trying to loop Windows updates until no updates are found because of the broken nature of windows updates.
When I try to run the playbook, I get the following error:

ERROR! Syntax Error while loading YAML.
The error appears to have been in ‘/home/ben/playbooks/update-windows_full.yml’: line 8, column 22, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
– name: Check for missing updates.
win_updates: state=searched
^ here
exception type: <class ‘yaml.scanner.ScannerError’>
exception: mapping values are not allowed in this context
in “”, line 8, column 22

  • name: Update Windows
    hosts: all
    tasks:
  • name: Check for missing updates.
    win_updates: state=searched
    register: update_count
  • name: Install all found updates.
    win_updates:
    category_names:
  • Application
  • Connectors
  • DefinitionUpdates
  • DeveloperKits
  • FeaturePacks
  • Guidance
  • ServicePacks
  • Tools
  • UpdateRollups
  • CriticalUpdates
  • SecurityUpdates
    register: update_result
  • name: Reboot, if needed.
    win_reboot:
    when: update_result.reboot_required
    until: update_count.found_update_count|int=0