From 5c7776d957e9396a481066e1d9cf1acd78b52fe6 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 29 Nov 2013 22:43:19 +0100 Subject: wibble --- lib/postmap | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/postmap b/lib/postmap index c0bf03b..5691c48 100644 --- a/lib/postmap +++ b/lib/postmap @@ -68,8 +68,10 @@ def main(): ) params = module.params - src = params['src'] - cmd = params['cmd'] + src = params['src'] + db = params['db'] + cmd = params['cmd'] + instance = params['instance'] if os.path.isabs(src): src = src @@ -80,7 +82,7 @@ def main(): module.fail_json(src=src, msg="no such file") try: - dst = "%s.%s" % (src, file_suffix(params['instance'], params['db'])) + dst = "%s.%s" % (src, file_suffix(instance, db)) params['dest'] = dst file_args = module.load_file_common_arguments(params) @@ -89,7 +91,7 @@ def main(): if not os.path.exists(dst) or os.path.getmtime(dst) <= os.path.getmtime(src): changed = True if not module.check_mode: - msg = compile( params['cmd'], params['instance'], params['db'], src) + msg = compile( cmd, instance, db, src) except subprocess.CalledProcessError, e: module.fail_json(rv=e.returncode, msg=e.output.rstrip()) -- cgit v1.2.3