mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add a new inventory parameter (ansible_sudo_exe) to specify sudo command path.
This commit is contained in:
@@ -471,7 +471,7 @@ class TestUtils(unittest.TestCase):
|
||||
self.assertEqual(ansible.utils.boolean("foo"), False)
|
||||
|
||||
def test_make_sudo_cmd(self):
|
||||
cmd = ansible.utils.make_sudo_cmd('root', '/bin/sh', '/bin/ls')
|
||||
cmd = ansible.utils.make_sudo_cmd(C.DEFAULT_SUDO_EXE, 'root', '/bin/sh', '/bin/ls')
|
||||
self.assertTrue(isinstance(cmd, tuple))
|
||||
self.assertEqual(len(cmd), 3)
|
||||
self.assertTrue('-u root' in cmd[0])
|
||||
|
||||
Reference in New Issue
Block a user