From 20301427f86b97cf4b1b0b9ece93699b51400b22 Mon Sep 17 00:00:00 2001 From: Jonathan Mainguy Date: Fri, 22 May 2015 21:28:36 -0400 Subject: [PATCH] fixes check mode for Ubuntu 14.04 --- lib/ansible/modules/system/service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/system/service.py b/lib/ansible/modules/system/service.py index 031b495f51d..41c00ea9171 100644 --- a/lib/ansible/modules/system/service.py +++ b/lib/ansible/modules/system/service.py @@ -784,6 +784,9 @@ class LinuxService(Service): else: 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)) if rc != 0: if err: