From 55a1473d5068308198ffbb0b2a14731fbb23637c Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Sun, 28 Oct 2012 11:14:29 +0100 Subject: [PATCH] Don't add file module arguments by default This allows the postgresql_db module to work properly, as it uses an argument named owner that conflicts with the file module. --- lib/ansible/module_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py index 72aa97099e..aeb9462687 100644 --- a/lib/ansible/module_common.py +++ b/lib/ansible/module_common.py @@ -88,7 +88,7 @@ class AnsibleModule(object): def __init__(self, argument_spec, bypass_checks=False, no_log=False, check_invalid_arguments=True, mutually_exclusive=None, required_together=None, - required_one_of=None, add_file_common_args=True): + required_one_of=None, add_file_common_args=False): ''' common code for quickly building an ansible module in Python @@ -458,7 +458,7 @@ class AnsibleModule(object): default = v.get('default', None) if pre == True: # this prevents setting defaults on required items - if default and k not in self.params: + if default is not None and k not in self.params: self.params[k] = default else: # make sure things without a default still get set None