mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Set the inventory on the variable manager for the adhoc cli usage (v2)
This commit is contained in:
parent
dd7a641e76
commit
8db21f99b7
1 changed files with 1 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue