mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
normalize error message on src != dir when local
now action plugin returns same error as module
This commit is contained in:
@@ -109,6 +109,11 @@ class ActionModule(ActionBase):
|
||||
if regexp is not None:
|
||||
_re = re.compile(regexp)
|
||||
|
||||
if not os.path.isdir(src):
|
||||
result['failed'] = True
|
||||
result['msg'] = "Source (%s) is not a directory" % src
|
||||
return result
|
||||
|
||||
# Does all work assembling the file
|
||||
path = self._assemble_from_fragments(src, delimiter, _re, ignore_hidden)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user