1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

add terminal initial prompt for initial connection (#57057)

This commit is contained in:
xuxiaowei0512 2019-05-30 00:37:14 +08:00 committed by Nathaniel Case
parent fe1f1c4541
commit 9e1f184b2d

View file

@ -31,7 +31,13 @@ class TerminalModule(TerminalBase):
re.compile(br'[\r\n]?<.+>(?:\s*)$'),
re.compile(br'[\r\n]?\[.+\](?:\s*)$'),
]
#: terminal initial prompt
#: The password needs to be changed. Change now? [Y/N]:
terminal_initial_prompt = br'Change\s*now\s*\?\s*\[Y\/N\]\s*:'
#: terminal initial answer
#: do not change password when it is asked to change with initial connection.
terminal_initial_answer = b'N'
terminal_stderr_re = [
re.compile(br"% ?Error: "),
re.compile(br"^% \w+", re.M),