diff --git a/lib/ansible/playbook/play_context.py b/lib/ansible/playbook/play_context.py index 8d57fb899f4..00d6d2e1ef9 100644 --- a/lib/ansible/playbook/play_context.py +++ b/lib/ansible/playbook/play_context.py @@ -26,9 +26,6 @@ import random import re import string -from pwd import getpwuid -from os import geteuid - from ansible.compat.six import iteritems, string_types from ansible import constants as C from ansible.errors import AnsibleError @@ -482,7 +479,3 @@ class PlayContext(Base): for prop, varnames in MAGIC_VARIABLE_MAPPING.items(): if special_var in varnames: variables[special_var] = getattr(self, prop) - - # for backwards compat - if variables['ansible_ssh_user'] is None: - variables['ansible_ssh_user'] = getpwuid(geteuid())[0]