Dont exit in FreeBSD/NetBSD subclass in check mode
* As the FIXMEs note: only exit if enable state is going to change. * This is already handled in service_enable_rcconf() being called by both subclasses.
This commit is contained in:
parent
d4bb57d42d
commit
4a3622200a
1 changed files with 0 additions and 8 deletions
8
service
8
service
|
@ -595,10 +595,6 @@ class FreeBsdService(Service):
|
||||||
|
|
||||||
self.rcconf_key = "%s_enable" % self.name
|
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()
|
return self.service_enable_rcconf()
|
||||||
|
|
||||||
def service_control(self):
|
def service_control(self):
|
||||||
|
@ -678,10 +674,6 @@ class NetBsdService(Service):
|
||||||
else:
|
else:
|
||||||
self.rcconf_value = "NO"
|
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?
|
rcfiles = [ '/etc/rc.conf' ] # Overkill?
|
||||||
for rcfile in rcfiles:
|
for rcfile in rcfiles:
|
||||||
if os.path.isfile(rcfile):
|
if os.path.isfile(rcfile):
|
||||||
|
|
Loading…
Reference in a new issue