mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make "enabled" code aware of --check mode.
This commit is contained in:
parent
d1433eca14
commit
38d8db473f
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue