From 2823c8c9872a44d217bd260a41efb49ed8dcef5c Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 16 Mar 2015 14:00:07 -0400 Subject: [PATCH] fixed raw return check for privilege escalation --- lib/ansible/runner/action_plugins/raw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/action_plugins/raw.py b/lib/ansible/runner/action_plugins/raw.py index b1ba2c99d94..e52296b2e78 100644 --- a/lib/ansible/runner/action_plugins/raw.py +++ b/lib/ansible/runner/action_plugins/raw.py @@ -48,7 +48,7 @@ class ActionModule(object): # for some modules (script, raw), the sudo success key # may leak into the stdout due to the way the sudo/su # command is constructed, so we filter that out here - if result.get('stdout','').strip().startswith('SUDO-SUCCESS-'): - result['stdout'] = re.sub(r'^((\r)?\n)?SUDO-SUCCESS.*(\r)?\n', '', result['stdout']) + if result.get('stdout','').strip().startswith('BECOME-SUCCESS-'): + result['stdout'] = re.sub(r'^((\r)?\n)?BECOME-SUCCESS.*(\r)?\n', '', result['stdout']) return ReturnData(conn=conn, result=result)