From 298e782ff7c5bddca476e80bb1ef93462d8bf04e Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 14 Apr 2015 18:48:36 -0400 Subject: [PATCH] Expand user in path, fix #385 --- lib/ansible/modules/extras/files/patch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/extras/files/patch.py b/lib/ansible/modules/extras/files/patch.py index 2f2894a6508..ec3a3b02c00 100755 --- a/lib/ansible/modules/extras/files/patch.py +++ b/lib/ansible/modules/extras/files/patch.py @@ -130,6 +130,7 @@ def main(): # Create type object as namespace for module params p = type('Params', (), module.params) + p.src = os.path.expanduser(p.src) if not os.access(p.src, R_OK): module.fail_json(msg="src %s doesn't exist or not readable" % (p.src))