From 5f83a6aeda131f519a47d929eabe1666a7dff21b Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Thu, 3 Dec 2015 11:29:09 -0500 Subject: [PATCH] Properly default remote_user for delegated-to hosts Fixes #13323 --- lib/ansible/playbook/play_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/play_context.py b/lib/ansible/playbook/play_context.py index b2b7e444975..5c020939808 100644 --- a/lib/ansible/playbook/play_context.py +++ b/lib/ansible/playbook/play_context.py @@ -350,7 +350,7 @@ class PlayContext(Base): if user_var in delegated_vars: break else: - delegated_vars['ansible_user'] = None + delegated_vars['ansible_user'] = task.remote_user or self.remote_user else: delegated_vars = dict()