From 0a902a5afd43fe817320bd1e400828abcd1faa83 Mon Sep 17 00:00:00 2001 From: Henk Wiedig Date: Tue, 10 Feb 2015 05:18:37 -0500 Subject: [PATCH] make su promt AIX compatible $ su suuser date suusers's Password: --- lib/ansible/utils/su_prompts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/utils/su_prompts.py b/lib/ansible/utils/su_prompts.py index f6641a43217..04e98e1c45e 100644 --- a/lib/ansible/utils/su_prompts.py +++ b/lib/ansible/utils/su_prompts.py @@ -53,7 +53,7 @@ SU_PROMPT_LOCALIZATIONS = [ '密碼', ] -SU_PROMPT_LOCALIZATIONS_RE = re.compile("|".join([x + ' ?: ?' for x in SU_PROMPT_LOCALIZATIONS]), flags=re.IGNORECASE) +SU_PROMPT_LOCALIZATIONS_RE = re.compile("|".join(['(\w+\'s )?' + x + ' ?: ?' for x in SU_PROMPT_LOCALIZATIONS]), flags=re.IGNORECASE) def check_su_prompt(data): return bool(SU_PROMPT_LOCALIZATIONS_RE.match(data))