Created
December 3, 2014 22:06
-
-
Save abadger/9882dd1b7f764e0ec3fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py | |
index 4d2bd66..76ce641 100644 | |
--- a/lib/ansible/runner/__init__.py | |
+++ b/lib/ansible/runner/__init__.py | |
@@ -1223,7 +1223,11 @@ class Runner(object): | |
def _remote_checksum(self, conn, tmp, path, inject): | |
''' takes a remote checksum and returns 1 if no file ''' | |
- python_interp = inject['hostvars'][inject['inventory_hostname']].get('ansible_python_interpreter', 'python') | |
+ import q ; q.q(repr(inject)) | |
+ if inject['delegate_to']: | |
+ python_interp = inject['hostvars'][inject['delegate_to']].get('ansible_python_interpreter', python) | |
+ else: | |
+ python_interp = inject['hostvars'][inject['inventory_hostname']].get('ansible_python_interpreter', 'python') | |
cmd = conn.shell.checksum(path, python_interp) | |
data = self._low_level_exec_command(conn, cmd, tmp, sudoable=True) | |
data2 = utils.last_non_blank_line(data['stdout']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to make 2 minor changes to get it to work on my machine