|
|
@ -21,7 +21,9 @@
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
__metaclass__ = type
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
import pipes
|
|
|
|
import pipes
|
|
|
|
|
|
|
|
import pwd
|
|
|
|
import random
|
|
|
|
import random
|
|
|
|
import re
|
|
|
|
import re
|
|
|
|
import string
|
|
|
|
import string
|
|
|
@ -409,6 +411,12 @@ class PlayContext(Base):
|
|
|
|
if new_info.port is None and C.DEFAULT_REMOTE_PORT is not None:
|
|
|
|
if new_info.port is None and C.DEFAULT_REMOTE_PORT is not None:
|
|
|
|
new_info.port = int(C.DEFAULT_REMOTE_PORT)
|
|
|
|
new_info.port = int(C.DEFAULT_REMOTE_PORT)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if the final connection type is local, reset the remote_user value
|
|
|
|
|
|
|
|
# to that of the currently logged in user, to ensure any become settings
|
|
|
|
|
|
|
|
# are obeyed correctly
|
|
|
|
|
|
|
|
if new_info.connection == 'local':
|
|
|
|
|
|
|
|
new_info.remote_user = pwd.getpwuid(os.getuid()).pw_name
|
|
|
|
|
|
|
|
|
|
|
|
# special overrides for the connection setting
|
|
|
|
# special overrides for the connection setting
|
|
|
|
if len(delegated_vars) > 0:
|
|
|
|
if len(delegated_vars) > 0:
|
|
|
|
# in the event that we were using local before make sure to reset the
|
|
|
|
# in the event that we were using local before make sure to reset the
|
|
|
|