Fix docker_swarm, docker_machine and gitlab_runners inventory plugins' verify method. (#67)

This commit is contained in:
Felix Fontein 2020-03-29 20:14:22 +02:00
parent 0560501336
commit 55f6a15338
2 changed files with 2 additions and 2 deletions

View File

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

View File

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