When no repos are defined, the `repo` variable is undefined. Therefore append it only to the result if a repo was found. Otherwise Ansible will fail with an UnboundLocalError.