mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fail when service cannot be found by chkconfig
This commit is contained in:
parent
2e797a5155
commit
efc98a09fe
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue