Fix proposed by @Yannig to fix become success detection when the output is multiline

See the Bug report for a specific error case with local connection,
sudo, and the raw module

Fixes #13728
pull/13967/merge
Toshio Kuratomi 9 years ago
parent 27f4730c29
commit ded02b4968

@ -206,7 +206,10 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
pass
def check_become_success(self, output):
return self._play_context.success_key == output.rstrip()
for line in output.splitlines(True):
if self._play_context.success_key == line.rstrip():
return True
return False
def check_password_prompt(self, output):
if self._play_context.prompt is None:

Loading…
Cancel
Save