implementation error -- msg to explain the error is required

I'm getting this golden nugget when trying to launch a stack with the
cloudformation module:

I found the relevant code in module_common.py, but I'm not sure what
it's trying to tell me.

Any ideas?

"TASK: [launch zombie stack] ***************************************************
failed: [127.0.0.1] => {"failed": true, "item": "", "parsed": false}
invalid output was: Traceback (most recent call last):
  File "/Users/jmartin/.ansible/tmp/ansible-1372284392.12-102223282280847/cloudformation",
line 1156, in <module>
    main()
  File "/Users/jmartin/.ansible/tmp/ansible-1372284392.12-102223282280847/cloudformation",
line 199, in main
    module.fail_json(**result)
  File "/Users/jmartin/.ansible/tmp/ansible-1372284392.12-102223282280847/cloudformation",
line 994, in fail_json
    assert 'msg' in kwargs, "implementation error -- msg to explain
the error is required"
AssertionError: implementation error -- msg to explain the error is required"

Thanks,

James

when you call fail_json you need to pass a “msg” argument.

I just got the same error while using cloudformation module. It looks like cloudformation module is incorrectly passing ‘output’ instead of ‘msg’ argument.

https://github.com/ansible/ansible/blob/devel/library/cloud/cloudformation (line 198-199):


                result = {'changed': False, '**output**': error_msg}
                module.fail_json(**result)

Boris,

I just put in a pull request for this bug yesterday. Hopefully Michael will merge it soon.

James