Merge pull request #1597 from yta/fix_check_mode_issue_in_osx_defaults

osx_defaults: Do not make any changes in check mode
This commit is contained in:
René Moser 2016-03-15 22:27:39 +01:00
commit 186a68a382

View file

@ -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