testing python / ansible modules

170 views
Skip to first unread message

Alex Leonhardt

unread,
Aug 24, 2016, 10:05:24 AM8/24/16
to Ansible Project

Hi All,


I was wondering if anyone ever wrote tests for an ansible module ?


I'm trying to instantiate m = AnsibleModule(argument_spec=dict()) but it keeps failing with "Error: Module unable to decode valid JSON on stdin.", before I can even call m.params = {} or something to give the instance some parameters to work with. To me it seems you're currently unable to specify / override parameters passed to a AnsibleModule directly, is there something I can do to give AnsibleModule the correct context to find these parameters ?


Thanks!

Alex


Reply all
Reply to author
Forward
0 new messages