diff --git a/plugins/inventory/docker_machine.py b/plugins/inventory/docker_machine.py index f2d7e1fb..c1559453 100644 --- a/plugins/inventory/docker_machine.py +++ b/plugins/inventory/docker_machine.py @@ -248,7 +248,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): """Return the possibility of a file being consumable by this plugin.""" return ( super(InventoryModule, self).verify_file(path) and - path.endswith((self.NAME + '.yaml', self.NAME + '.yml'))) + path.endswith(('docker_machine.yaml', 'docker_machine.yml'))) def parse(self, inventory, loader, path, cache=True): super(InventoryModule, self).parse(inventory, loader, path, cache) diff --git a/plugins/inventory/docker_swarm.py b/plugins/inventory/docker_swarm.py index 12047b1c..8cbfcc43 100644 --- a/plugins/inventory/docker_swarm.py +++ b/plugins/inventory/docker_swarm.py @@ -244,7 +244,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable): """Return the possibly of a file being consumable by this plugin.""" return ( super(InventoryModule, self).verify_file(path) and - path.endswith((self.NAME + '.yaml', self.NAME + '.yml'))) + path.endswith(('docker_swarm.yaml', 'docker_swarm.yml'))) def parse(self, inventory, loader, path, cache=True): if not HAS_DOCKER: