Howto access 'exists' from a register: var which has results?

Hi,

I have a task which checks if some files exist and does a register. In the next task, how do I access the exists: [false|true] result for use in 'when:'? I tried variations of things like this: 'repos_extra_installed.results.stats.exists == false'
but I always get an error.

group_vars:

repos_extra_repos:
   - repos_extra_name: internal
     repos_extra_file: internal.repo
     repos_extra_key: RPM-GPG-KEY-internal

task:

- name: repos | Check if extra repos are already installed
   stat:
     path: /etc/yum.repos.d/{{ item.repos_extra_file }}
   with_items: repos_extra_repos
   register: repos_extra_installed

- debug: var=repos_extra_installed

Debug output:

TASK: [common | debug var=repos_extra_installed]

It should be repos_extra_installed.results[0].stat.exists.

It's more complicated because you're doing a with_items on the task
that does the register. So each item in that list will have a separate
entry in the repos_extra_installed.results list.

Thank you Michael.

Cheers,
Patrick