mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Define 'inventory_hostname' variable for hosts.
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user