1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Revert "remove checking of stderr for insserv (#1846)"

This reverts commit 2ee6e4cf668a9bba77c3bb019d473f3614563838.
This commit is contained in:
James Tanner 2016-05-05 10:41:06 -04:00 committed by Matt Clay
parent 8c6af73218
commit bc39f8c42e

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):
if (rc != 0) or (err != ''):
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):
if (rc != 0) or (err != ''):
self.module.fail_json(msg=("Failed to remove service. rc: %s, out: %s, err: %s" % (rc, out, err)))
return (rc, out, err)