fixing become success string
This commit is contained in:
parent
73eca8239b
commit
3102469b94
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ class ActionModule(ActionBase):
|
|||
# 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 result
|
||||
|
|
Loading…
Reference in a new issue