remove checking of stderr for insserv (#1846)

stderr of insserv can also contain warnings which can be ignored. checking rc only is more accurate.
fixes #1502
This commit is contained in:
TheSameCH 2016-05-05 04:09:55 +02:00 committed by jctanner
parent e29878e9f0
commit 2ee6e4cf66

View file

@ -826,12 +826,12 @@ class LinuxService(Service):
if self.enable:
(rc, out, err) = self.execute_command("%s %s" % (self.enable_cmd, self.name))
if (rc != 0) or (err != ''):
if (rc != 0):
self.module.fail_json(msg=("Failed to install service. rc: %s, out: %s, err: %s" % (rc, out, err)))
return (rc, out, err)
else:
(rc, out, err) = self.execute_command("%s -r %s" % (self.enable_cmd, self.name))
if (rc != 0) or (err != ''):
if (rc != 0):
self.module.fail_json(msg=("Failed to remove service. rc: %s, out: %s, err: %s" % (rc, out, err)))
return (rc, out, err)