Fix docker_swarm, docker_machine and gitlab_runners inventory plugins' verify method. (#67)
parent
897c6ad0f2
commit
8c76619799
|
@ -248,7 +248,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||||
"""Return the possibility of a file being consumable by this plugin."""
|
"""Return the possibility of a file being consumable by this plugin."""
|
||||||
return (
|
return (
|
||||||
super(InventoryModule, self).verify_file(path) and
|
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):
|
def parse(self, inventory, loader, path, cache=True):
|
||||||
super(InventoryModule, self).parse(inventory, loader, path, cache)
|
super(InventoryModule, self).parse(inventory, loader, path, cache)
|
||||||
|
|
|
@ -244,7 +244,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||||
"""Return the possibly of a file being consumable by this plugin."""
|
"""Return the possibly of a file being consumable by this plugin."""
|
||||||
return (
|
return (
|
||||||
super(InventoryModule, self).verify_file(path) and
|
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):
|
def parse(self, inventory, loader, path, cache=True):
|
||||||
if not HAS_DOCKER:
|
if not HAS_DOCKER:
|
||||||
|
|
|
@ -120,7 +120,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
||||||
"""Return the possibly of a file being consumable by this plugin."""
|
"""Return the possibly of a file being consumable by this plugin."""
|
||||||
return (
|
return (
|
||||||
super(InventoryModule, self).verify_file(path) and
|
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):
|
def parse(self, inventory, loader, path, cache=True):
|
||||||
if not HAS_GITLAB:
|
if not HAS_GITLAB:
|
||||||
|
|
Loading…
Reference in New Issue