Make "enabled" code aware of --check mode.
This commit is contained in:
parent
1b97390765
commit
c46e030100
1 changed files with 3 additions and 0 deletions
|
@ -989,6 +989,9 @@ class OpenBsdService(Service):
|
||||||
if rc == 1:
|
if rc == 1:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if self.module.check_mode:
|
||||||
|
self.module.exit_json(changed=True, msg="changing service enablement")
|
||||||
|
|
||||||
# XXX check rc ?
|
# XXX check rc ?
|
||||||
rc, stdout, stderr = self.execute_command("%s %s" % (self.enable_cmd, action))
|
rc, stdout, stderr = self.execute_command("%s %s" % (self.enable_cmd, action))
|
||||||
self.changed = True
|
self.changed = True
|
||||||
|
|
Loading…
Reference in a new issue