diff --git a/plugins/inventory/docker_machine.py b/plugins/inventory/docker_machine.py index 3dcd61d25e..7ca9e7a435 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 05de1a4dde..f79a34c74b 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: diff --git a/plugins/inventory/gitlab_runners.py b/plugins/inventory/gitlab_runners.py index ed8bb167ab..13861bf62e 100644 --- a/plugins/inventory/gitlab_runners.py +++ b/plugins/inventory/gitlab_runners.py @@ -120,7 +120,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(("gitlab_runners.yaml", "gitlab_runners.yml"))) def parse(self, inventory, loader, path, cache=True): if not HAS_GITLAB: