mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-24 01:49:08 -07:00
Merge pull request #1442 from dhozac/dwim-fileglob
path_dwim the path given to with_fileglob
This commit is contained in:
commit
29e272eb67
1 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
|
from ansible import utils
|
||||||
|
|
||||||
class LookupModule(object):
|
class LookupModule(object):
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ class LookupModule(object):
|
||||||
self.runner = runner
|
self.runner = runner
|
||||||
|
|
||||||
def run(self, terms):
|
def run(self, terms):
|
||||||
return [ f for f in glob.glob(terms) if os.path.isfile(f) ]
|
return [ f for f in glob.glob(utils.path_dwim(self.runner.basedir, terms)) if os.path.isfile(f) ]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue