diff --git a/lib/ansible/inventory/manager.py b/lib/ansible/inventory/manager.py index 99f29cbacc..e93884eecd 100644 --- a/lib/ansible/inventory/manager.py +++ b/lib/ansible/inventory/manager.py @@ -183,7 +183,6 @@ class InventoryManager(object): for name in C.INVENTORY_ENABLED: plugin = inventory_loader.get(name) if plugin: - plugin.set_options() self._inventory_plugins.append(plugin) else: display.warning('Failed to load inventory plugin, skipping %s' % name) diff --git a/lib/ansible/plugins/inventory/script.py b/lib/ansible/plugins/inventory/script.py index 0876649331..8bc1de7311 100644 --- a/lib/ansible/plugins/inventory/script.py +++ b/lib/ansible/plugins/inventory/script.py @@ -85,6 +85,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable): def parse(self, inventory, loader, path, cache=None): super(InventoryModule, self).parse(inventory, loader, path) + self.set_options() if cache is None: cache = self.get_option('cache') diff --git a/lib/ansible/plugins/inventory/yaml.py b/lib/ansible/plugins/inventory/yaml.py index 5983ce0674..436dbb6bdb 100644 --- a/lib/ansible/plugins/inventory/yaml.py +++ b/lib/ansible/plugins/inventory/yaml.py @@ -90,6 +90,7 @@ class InventoryModule(BaseFileInventoryPlugin): ''' parses the inventory file ''' super(InventoryModule, self).parse(inventory, loader, path) + self.set_options() try: data = self.loader.load_from_file(path, cache=False)