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

Merge pull request #2378 from eest/service_bsd_check

Dont exit in FreeBSD/NetBSD subclass in check mode
This commit is contained in:
Michael DeHaan 2013-03-12 12:39:13 -07:00
commit 91b3dc73cc

View file

@ -595,10 +595,6 @@ class FreeBsdService(Service):
self.rcconf_key = "%s_enable" % self.name
# FIXME: detect the enablement state rather than just running the command
if self.module.check_mode:
self.module.exit_json(changed=True, msg="editing service enablement")
return self.service_enable_rcconf()
def service_control(self):
@ -678,10 +674,6 @@ class NetBsdService(Service):
else:
self.rcconf_value = "NO"
# FIXME: need to decide whether to run enablement command or not
if self.module.check_mode:
self.module.exit_json(changed=True, msg="editing service enablement")
rcfiles = [ '/etc/rc.conf' ] # Overkill?
for rcfile in rcfiles:
if os.path.isfile(rcfile):