From faf82bf84184872f25f27e6e2e65d766384f5127 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 28 Aug 2013 13:22:24 -0500 Subject: [PATCH] Fix bug with fetch when using sudo: true Fixes #3111 --- lib/ansible/runner/action_plugins/fetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/action_plugins/fetch.py b/lib/ansible/runner/action_plugins/fetch.py index 4f8de7e9dc..a07db8162c 100644 --- a/lib/ansible/runner/action_plugins/fetch.py +++ b/lib/ansible/runner/action_plugins/fetch.py @@ -73,7 +73,7 @@ class ActionModule(object): # use slurp if sudo and permissions are lacking remote_data = None - if remote_md5 in ('1', '2') and self.runner.sudo: + if remote_md5 in ('1', '2') or self.runner.sudo: slurpres = self.runner._execute_module(conn, tmp, 'slurp', 'src=%s' % source, inject=inject) if slurpres.is_successful(): if slurpres.result['encoding'] == 'base64':