diff --git a/lib/ansible/modules/system/service.py b/lib/ansible/modules/system/service.py index 37ecac2ddb6..7739fc8b00b 100644 --- a/lib/ansible/modules/system/service.py +++ b/lib/ansible/modules/system/service.py @@ -1032,6 +1032,9 @@ class OpenBsdService(Service): if rc == 1: return + if self.module.check_mode: + self.module.exit_json(changed=True, msg="changing service enablement") + # XXX check rc ? rc, stdout, stderr = self.execute_command("%s %s" % (self.enable_cmd, action)) self.changed = True