diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 6563c24884..59e2094e22 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -588,7 +588,7 @@ class Runner(object): self.sudo_pass = inject.get('ansible_sudo_pass', self.sudo_pass) if actual_private_key_file is not None: - actual_private_key_file = os.path.expanduser(actual_private_key_file) + actual_private_key_file = os.path.expanduser(actual_private_key_file) if self.accelerate and actual_transport != 'local': #Fix to get the inventory name of the host to accelerate plugin @@ -631,7 +631,7 @@ class Runner(object): self.sudo_pass = delegate_info.get('ansible_sudo_pass', self.sudo_pass) if actual_private_key_file is not None: - actual_private_key_file = os.path.expanduser(actual_private_key_file) + actual_private_key_file = os.path.expanduser(actual_private_key_file) for i in delegate_info: if i.startswith("ansible_") and i.endswith("_interpreter"):