From 55f6a15338446f3d62506c7e324d1f4fa8db38c8 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 29 Mar 2020 20:14:22 +0200 Subject: [PATCH] Fix docker_swarm, docker_machine and gitlab_runners inventory plugins' verify method. (#67) --- plugins/inventory/docker_machine.py | 2 +- plugins/inventory/docker_swarm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: