mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-01 22:09:08 -07:00
don't set user to current user
also remove condition to bypass setting user if user matches current user this enables forcing user when set to the same user as current user and ignoring .ssh/config while keeping .ssh/config with current user if nothing is specified.
This commit is contained in:
parent
25e3fe04a8
commit
f78c82b9ee
3 changed files with 3 additions and 8 deletions
|
@ -19,7 +19,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import pwd
|
||||
import os
|
||||
|
||||
from ansible.compat.tests import unittest
|
||||
|
@ -55,7 +54,7 @@ class TestPlayContext(unittest.TestCase):
|
|||
play_context = PlayContext(options=options)
|
||||
self.assertEqual(play_context.connection, 'smart')
|
||||
self.assertEqual(play_context.remote_addr, None)
|
||||
self.assertEqual(play_context.remote_user, pwd.getpwuid(os.geteuid())[0])
|
||||
self.assertEqual(play_context.remote_user, None)
|
||||
self.assertEqual(play_context.password, '')
|
||||
self.assertEqual(play_context.port, None)
|
||||
self.assertEqual(play_context.private_key_file, C.DEFAULT_PRIVATE_KEY_FILE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue