|
|
|
@ -378,7 +378,15 @@ class PlayContextSpec(Spec):
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
def become_exe(self):
|
|
|
|
|
return self._play_context.become_exe
|
|
|
|
|
# In Ansible 2.8, PlayContext.become_exe always has a default value due
|
|
|
|
|
# to the new options mechanism. Previously it was only set if a value
|
|
|
|
|
# ("somewhere") had been specified for the task.
|
|
|
|
|
# For consistency in the tests, here we make older Ansibles behave like
|
|
|
|
|
# newer Ansibles.
|
|
|
|
|
exe = self._play_context.become_exe
|
|
|
|
|
if exe is None and self._play_context.become_method == 'sudo':
|
|
|
|
|
exe = 'sudo'
|
|
|
|
|
return exe
|
|
|
|
|
|
|
|
|
|
def sudo_args(self):
|
|
|
|
|
return [
|
|
|
|
|