Merge pull request #9182 from bbasleeper/feature_sudo_exe_from_inventory

Add a new inventory parameter (ansible_sudo_exe) to specify sudo command...
This commit is contained in:
Toshio Kuratomi 2014-09-30 14:55:46 -04:00
commit 0af750e3e5
8 changed files with 12 additions and 7 deletions

View file

@ -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])