From 91abacfca76868d23da419b1802c502cd1f61d5c Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Wed, 31 Aug 2016 10:29:41 -0500 Subject: [PATCH] Make sure we don't catch rc=0 as a timeout (#2823) --- lib/ansible/modules/extras/commands/expect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/commands/expect.py b/lib/ansible/modules/extras/commands/expect.py index 4b5e5e8d62..a3d1b32d71 100644 --- a/lib/ansible/modules/extras/commands/expect.py +++ b/lib/ansible/modules/extras/commands/expect.py @@ -224,7 +224,7 @@ def main(): changed=True, ) - if rc: + if rc is not None: module.exit_json(**ret) else: ret['msg'] = 'command exceeded timeout'