1
0
Fork 0
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:
James Cammarata 2015-05-07 12:53:22 -05:00
parent dd7a641e76
commit 8db21f99b7

View file

@ -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: