From 0bfec51a04193d445c5217470f10d6a4579abf99 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Mon, 28 Jan 2013 17:46:35 +0100 Subject: [PATCH] Remove last remnants of daisychaining --- library/get_url | 3 +-- library/ini_file | 14 +++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/library/get_url b/library/get_url index 8d6e85f0d8..2db31c6d7c 100644 --- a/library/get_url +++ b/library/get_url @@ -255,8 +255,7 @@ def main(): # Mission complete module.exit_json(url=url, dest=dest, src=tmpsrc, md5sum=md5sum_src, - changed=changed, msg=info.get('msg', ''), - daisychain="file", daisychain_args=info.get('daisychain_args', '')) + changed=changed, msg=info.get('msg', '')) # this is magic, see lib/ansible/module_common.py #<> diff --git a/library/ini_file b/library/ini_file index ea78bff191..cc9771380d 100644 --- a/library/ini_file +++ b/library/ini_file @@ -153,8 +153,6 @@ def do_ini(module, filename, section=None, option=None, value=None, state='prese def main(): module = AnsibleModule( - # not checking because of daisy chain to file module - check_invalid_arguments = False, argument_spec = dict( dest = dict(required=True), section = dict(required=True), @@ -162,7 +160,8 @@ def main(): value = dict(required=False), backup = dict(default='no', choices=BOOLEANS), state = dict(default='present', choices=['present', 'absent']) - ) + ), + add_file_common_args = True ) info = dict() @@ -176,14 +175,11 @@ def main(): changed = do_ini(module, dest, section, option, value, state, backup) - info['daisychain_args'] = module.params - info['daisychain_args']['state'] = 'file' - info['daisychain_args']['dest'] = dest + file_args = module.load_file_common_arguments(module.params) + changed = module.set_file_attributes_if_different(file_args, changed) # Mission complete - module.exit_json(dest=dest, - changed=changed, msg="OK", - daisychain="file", daisychain_args=info.get('daisychain_args','')) + module.exit_json(dest=dest, changed=changed, msg="OK") # this is magic, see lib/ansible/module_common.py #<>