mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 14:21:26 -07:00
Add a new inventory parameter (ansible_sudo_exe) to specify sudo command path.
This commit is contained in:
parent
c4f1785217
commit
a25da4af05
8 changed files with 12 additions and 7 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue