From 226c7f4c7b272a651a47fdedaac2fe5aaa144f06 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 6 Nov 2015 08:31:35 -0500 Subject: [PATCH] Revert "added setting of ansible_ssh_user to current user as backwards compatibilty issue" scope was wrong, this var should not be 'reset' here. This reverts commit c271c0eb04f540bce8a4d6544cbcbc36dd2835a3. --- lib/ansible/playbook/play_context.py | 7 ------- 1 file changed, 7 deletions(-) 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]