From efc98a09fee86523a843d774c564dddfd34184ff Mon Sep 17 00:00:00 2001 From: Jeffrey Chu Date: Mon, 18 Mar 2013 01:12:28 -0700 Subject: [PATCH] fail when service cannot be found by chkconfig --- library/service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/service b/library/service index fb1da54df79..278cc77a915 100644 --- a/library/service +++ b/library/service @@ -465,7 +465,7 @@ class LinuxService(Service): if self.enable_cmd.endswith("chkconfig"): (rc, out, err) = self.execute_command("%s --list %s" % (self.enable_cmd, self.name)) if not self.name in out: - self.module.exit_json(msg="unknown service name") + self.module.fail_json(msg="unknown service name") state = out.split()[-1] if self.enable and ( "3:on" in out and "5:on" in out ): return