Correct hyphenation in host/group vars

All Zuul attributes use '-' not '_'.

Change-Id: I6e845195f0e347775db59f2c2d31782c39f3c0c0
diff --git a/doc/source/user/config.rst b/doc/source/user/config.rst
index 0932c56..36cd68c 100644
--- a/doc/source/user/config.rst
+++ b/doc/source/user/config.rst
@@ -877,14 +877,14 @@
       same name will override a previously defined variable, but new
       variable names will be added to the set of defined variables.
 
-   .. attr:: host_vars
+   .. attr:: host-vars
 
       A dictionary of host variables to supply to Ansible.  The keys
       of this dictionary are node names as defined in a
       :ref:`nodeset`, and the values are dictionaries of variables,
       just as in :attr:`job.vars`.
 
-   .. attr:: group_vars
+   .. attr:: group-vars
 
       A dictionary of group variables to supply to Ansible.  The keys
       of this dictionary are node groups as defined in a
@@ -912,10 +912,10 @@
                   - api2
          vars:
            foo: "this variable is visible to all nodes"
-         host_vars:
+         host-vars:
            controller:
              bar: "this variable is visible only on the controller node"
-         group_vars:
+         group-vars:
            api:
              baz: "this variable is visible on api1 and api2"
 
diff --git a/zuul/configloader.py b/zuul/configloader.py
index 3511f96..60c335c 100644
--- a/zuul/configloader.py
+++ b/zuul/configloader.py
@@ -514,6 +514,8 @@
                       'vars': dict,
                       'host_vars': {str: dict},
                       'group_vars': {str: dict},
+                      'host-vars': {str: dict},
+                      'group-vars': {str: dict},
                       'dependencies': to_list(str),
                       'allowed-projects': to_list(str),
                       'override-branch': str,
@@ -748,14 +750,14 @@
                 raise Exception("Variables named 'zuul' or 'nodepool' "
                                 "are not allowed.")
             job.variables = variables
-        host_variables = conf.get('host_vars', None)
+        host_variables = conf.get('host-vars', conf.get('host_vars', None))
         if host_variables:
             for host, hvars in host_variables.items():
                 if 'zuul' in hvars or 'nodepool' in hvars:
                     raise Exception("Variables named 'zuul' or 'nodepool' "
                                     "are not allowed.")
             job.host_variables = host_variables
-        group_variables = conf.get('group_vars', None)
+        group_variables = conf.get('group-vars', conf.get('group_vars', None))
         if group_variables:
             for group, gvars in group_variables.items():
                 if 'zuul' in group_variables or 'nodepool' in gvars: