From 77f5472a53546cfc38bf9520ee36229f67d49069 Mon Sep 17 00:00:00 2001 From: Evan Kaufman Date: Fri, 2 Sep 2016 11:55:03 -0700 Subject: [PATCH] Declare empty diff dict ahead of time (#4646) Fixes #4634 --- lib/ansible/modules/files/replace.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/files/replace.py b/lib/ansible/modules/files/replace.py index 7d26163c582..97103e3b4ff 100644 --- a/lib/ansible/modules/files/replace.py +++ b/lib/ansible/modules/files/replace.py @@ -130,6 +130,7 @@ def main(): params = module.params dest = os.path.expanduser(params['dest']) + diff = dict() if os.path.isdir(dest): module.fail_json(rc=256, msg='Destination %s is a directory !' % dest)