From 0446231380599b0874087c5cc17090e5ceedcec4 Mon Sep 17 00:00:00 2001 From: yta Date: Tue, 2 Feb 2016 23:19:33 +0900 Subject: [PATCH] osx_defaults: Do not make any changes in check mode --- lib/ansible/modules/extras/system/osx_defaults.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/modules/extras/system/osx_defaults.py b/lib/ansible/modules/extras/system/osx_defaults.py index 0c373d9f87c..6de673804e8 100644 --- a/lib/ansible/modules/extras/system/osx_defaults.py +++ b/lib/ansible/modules/extras/system/osx_defaults.py @@ -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