Properly default remote_user for delegated-to hosts

Fixes #13323
This commit is contained in:
James Cammarata 2015-12-03 11:29:09 -05:00
parent e201a255d1
commit 5f83a6aeda

View file

@ -350,7 +350,7 @@ class PlayContext(Base):
if user_var in delegated_vars: if user_var in delegated_vars:
break break
else: else:
delegated_vars['ansible_user'] = None delegated_vars['ansible_user'] = task.remote_user or self.remote_user
else: else:
delegated_vars = dict() delegated_vars = dict()