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
This commit is contained in:
parent
27f4730c29
commit
ded02b4968
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue