From 821c133ff842883231e9f7795ce2ec3d1e6f858b Mon Sep 17 00:00:00 2001 From: Tim Rupp Date: Fri, 4 Jul 2014 14:00:15 -0500 Subject: [PATCH] Fix missing msg argument The following patch adds a missing 'msg=' syntax. An exception is raised in ansible if this block is reached during the execution of the module TypeError: fail_json() takes exactly 1 argument (2 given) With the 'msg=' added, you get a more informative error. For example msg: No settings provided to update_domain(). --- cloud/rax_dns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/rax_dns b/cloud/rax_dns index 2a5b0be7b1a..f826cf00b95 100644 --- a/cloud/rax_dns +++ b/cloud/rax_dns @@ -126,7 +126,7 @@ def rax_dns(module, comment, email, name, state, ttl): changed = True domain.get() except Exception, e: - module.fail_json('%s' % e.message) + module.fail_json(msg='%s' % e.message) elif state == 'absent': try: