diff --git a/tests/unit/test_inventory.py b/tests/unit/test_inventory.py
index dca2e7e..2835d30 100644
--- a/tests/unit/test_inventory.py
+++ b/tests/unit/test_inventory.py
@@ -44,8 +44,15 @@
         all_nodes = ('ubuntu-xenial',)
         self.assertIn('all', inventory)
         self.assertIn('hosts', inventory['all'])
+        self.assertIn('vars', inventory['all'])
         for node_name in all_nodes:
             self.assertIn(node_name, inventory['all']['hosts'])
+        self.assertIn('zuul', inventory['all']['vars'])
+        z_vars = inventory['all']['vars']['zuul']
+        self.assertIn('executor', z_vars)
+        self.assertIn('src_root', z_vars['executor'])
+        self.assertIn('job', z_vars)
+        self.assertEqual(z_vars['job'], 'single-inventory')
 
         self.executor_server.release()
         self.waitUntilSettled()
@@ -57,11 +64,19 @@
         all_nodes = ('controller', 'compute1', 'compute2')
         self.assertIn('all', inventory)
         self.assertIn('hosts', inventory['all'])
+        self.assertIn('vars', inventory['all'])
         for group_name in ('ceph-osd', 'ceph-monitor'):
             self.assertIn(group_name, inventory)
         for node_name in all_nodes:
             self.assertIn(node_name, inventory['all']['hosts'])
             self.assertIn(node_name,
                           inventory['ceph-monitor']['hosts'])
+        self.assertIn('zuul', inventory['all']['vars'])
+        z_vars = inventory['all']['vars']['zuul']
+        self.assertIn('executor', z_vars)
+        self.assertIn('src_root', z_vars['executor'])
+        self.assertIn('job', z_vars)
+        self.assertEqual(z_vars['job'], 'group-inventory')
+
         self.executor_server.release()
         self.waitUntilSettled()
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 421281e..5323c21 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -183,7 +183,6 @@
         os.makedirs(self.ansible_root)
         self.known_hosts = os.path.join(self.ansible_root, 'known_hosts')
         self.inventory = os.path.join(self.ansible_root, 'inventory.yaml')
-        self.vars = os.path.join(self.ansible_root, 'vars.yaml')
         self.playbooks = []  # The list of candidate playbooks
         self.playbook = None  # A pointer to the candidate we have chosen
         self.pre_playbooks = []
@@ -312,7 +311,7 @@
                 shutil.copy(os.path.join(library_path, fn), target_dir)
 
 
-def make_inventory_dict(nodes, groups):
+def make_inventory_dict(nodes, groups, all_vars):
 
     hosts = {}
     for node in nodes:
@@ -321,6 +320,7 @@
     inventory = {
         'all': {
             'hosts': hosts,
+            'vars': all_vars,
         }
     }
 
@@ -1145,8 +1145,14 @@
             self.jobdir.trusted_roles_path.append(trusted_role_path)
 
     def prepareAnsibleFiles(self, args):
+        all_vars = dict(args['vars'])
+        all_vars['zuul']['executor'] = dict(
+            hostname=self.executor_server.hostname,
+            src_root=self.jobdir.src_root,
+            log_root=self.jobdir.log_root)
+
         nodes = self.getHostList(args)
-        inventory = make_inventory_dict(nodes, args['groups'])
+        inventory = make_inventory_dict(nodes, args['groups'], all_vars)
 
         with open(self.jobdir.inventory, 'w') as inventory_yaml:
             inventory_yaml.write(
@@ -1157,14 +1163,6 @@
                 for key in node['host_keys']:
                     known_hosts.write('%s\n' % key)
 
-        with open(self.jobdir.vars, 'w') as vars_yaml:
-            zuul_vars = dict(args['vars'])
-            zuul_vars['zuul']['executor'] = dict(
-                hostname=self.executor_server.hostname,
-                src_root=self.jobdir.src_root,
-                log_root=self.jobdir.log_root)
-            vars_yaml.write(
-                yaml.safe_dump(zuul_vars, default_flow_style=False))
         self.writeAnsibleConfig(self.jobdir.untrusted_config)
         self.writeAnsibleConfig(self.jobdir.trusted_config, trusted=True)
 
@@ -1318,12 +1316,10 @@
         else:
             verbose = '-v'
 
-        cmd = ['ansible-playbook', playbook.path]
+        cmd = ['ansible-playbook', verbose, playbook.path]
 
         if success is not None:
             cmd.extend(['-e', 'success=%s' % str(bool(success))])
 
-        cmd.extend(['-e@%s' % self.jobdir.vars, verbose])
-
         return self.runAnsible(
             cmd=cmd, timeout=timeout, trusted=playbook.trusted)
