using the results of a task include in a until loop

Is it possible to use a fact that was set in a include task file in the until condition of the loop?
When I try to run the following- the driver_status is never set until after this entire task has completed.

- name: Loop until status returns successful
  include: tasks/check_xxx_status.yml
  until: driver_status == 'RUNNING' 
  retries: 10
  delay: 10

Any help appreciated. Thanks!

Try to use:

`

  • name: Loop until status returns successful
    include: tasks/check_xxx_status.yml
    until: driver_status == ‘RUNNING’
    retries: 10
    delay: 10
    register: driver_reg

  • debug: var=driver_reg

  • name: Next task

    when: driver_reg.changed
    `