Merge pull request #1407 from Jmainguy/service_check_ubuntu

fixes check mode for Ubuntu 14.04
This commit is contained in:
Benno Joy 2015-05-25 08:13:29 +05:30
commit 29f4a5a1ed

View file

@ -765,6 +765,9 @@ class LinuxService(Service):
else: else:
action = 'disable' action = 'disable'
if self.module.check_mode:
rc = 0
return
(rc, out, err) = self.execute_command("%s %s %s" % (self.enable_cmd, self.name, action)) (rc, out, err) = self.execute_command("%s %s %s" % (self.enable_cmd, self.name, action))
if rc != 0: if rc != 0:
if err: if err: