mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
Set the inventory on the variable manager for the adhoc cli usage (v2)
This commit is contained in:
@@ -93,6 +93,7 @@ class AdHocCLI(CLI):
|
||||
variable_manager = VariableManager()
|
||||
|
||||
inventory = Inventory(loader=loader, variable_manager=variable_manager, host_list=self.options.inventory)
|
||||
variable_manager.set_inventory(inventory)
|
||||
|
||||
hosts = inventory.list_hosts(pattern)
|
||||
if len(hosts) == 0:
|
||||
|
||||
Reference in New Issue
Block a user