mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Define 'inventory_hostname' variable for hosts.
This commit is contained in:
parent
594084bc9f
commit
03541baba7
2 changed files with 23 additions and 9 deletions
|
@ -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())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue