From 32cb025b85661589f561ac18b10591db80dff959 Mon Sep 17 00:00:00 2001 From: Patrik Lundin Date: Thu, 28 Aug 2014 16:50:37 +0200 Subject: [PATCH] Fail if "rcctl status" writes to stderr. --- lib/ansible/modules/system/service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/system/service.py b/lib/ansible/modules/system/service.py index 90363222ba..efbba7e1b3 100644 --- a/lib/ansible/modules/system/service.py +++ b/lib/ansible/modules/system/service.py @@ -1030,6 +1030,8 @@ class OpenBsdService(Service): else: action = "disable %s" % self.name if rc == 1: + if stderr: + self.module.fail_json(msg=stderr) return if self.module.check_mode: