mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
osx_defaults: Do not make any changes in check mode
This commit is contained in:
parent
06d2682b08
commit
0446231380
1 changed files with 5 additions and 0 deletions
|
@ -257,6 +257,8 @@ class OSXDefaults(object):
|
|||
print "Absent state detected!"
|
||||
if self.current_value is None:
|
||||
return False
|
||||
if self.module.check_mode:
|
||||
return True
|
||||
self.delete()
|
||||
return True
|
||||
|
||||
|
@ -274,6 +276,9 @@ class OSXDefaults(object):
|
|||
elif self.current_value == self.value:
|
||||
return False
|
||||
|
||||
if self.module.check_mode:
|
||||
return True
|
||||
|
||||
# Change/Create/Set given key/value for domain in defaults
|
||||
self.write()
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue