Define 'inventory_hostname' variable for hosts.

This commit is contained in:
Jeroen Hoekx 2012-05-02 09:56:58 +02:00
commit 03541baba7
2 changed files with 23 additions and 9 deletions

View file

@ -81,7 +81,10 @@ class Inventory(object):
def get_variables(self, host):
""" Return the variables associated with this host. """
variables = {}
variables = {
'inventory_hostname': host,
}
if host in self._variables:
variables.update(self._variables[host].copy())