From 48b20684f2f14571ecd6770ab2b8da1279e3ce82 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 1 Feb 2016 13:42:55 -0500 Subject: [PATCH] normalize error message on src != dir when local now action plugin returns same error as module --- lib/ansible/plugins/action/assemble.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/plugins/action/assemble.py b/lib/ansible/plugins/action/assemble.py index 64fb2f45cce..aae105400fd 100644 --- a/lib/ansible/plugins/action/assemble.py +++ b/lib/ansible/plugins/action/assemble.py @@ -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)