From 456f83962d2233cb0b367c5b5749b2b2c7e4455e Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 19 Mar 2015 14:31:00 -0400 Subject: [PATCH] ignore PE methods that are not sudo for checksums until we get them working universally --- lib/ansible/runner/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 5c55548161..8e326935b0 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -1243,7 +1243,13 @@ class Runner(object): python_interp = 'python' cmd = conn.shell.checksum(path, python_interp) - data = self._low_level_exec_command(conn, cmd, tmp, sudoable=True) + + #TODO: remove this horrible hack and find way to get checksum to work with other privilege escalation methods + if self.become_method == 'sudo': + sudoable = True + else: + sudoable = False + data = self._low_level_exec_command(conn, cmd, tmp, sudoable=sudoable) data2 = utils.last_non_blank_line(data['stdout']) try: if data2 == '':