Merge "Fail execution if a role repo is a bare collection of roles" into feature/zuulv3
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 6f9f930..fc9acb3 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -1095,11 +1095,8 @@
                 for entry in os.listdir(d):
                     self._blockPluginDirs(os.path.join(d, entry))
             return d
-        # We assume the repository itself is a collection of roles
-        if not trusted:
-            for entry in os.listdir(path):
-                self._blockPluginDirs(os.path.join(path, entry))
-        return path
+        # It is neither a bare role, nor a collection of roles
+        raise Exception("Unable to find role in %s" % (path,))
 
     def prepareZuulRole(self, args, role, root, trusted, untrusted):
         self.log.debug("Prepare zuul role for %s" % (role,))