# My library modules stopped working after 1.8

**URL:** <https://forum.ansible.com/t/my-library-modules-stopped-working-after-1-8/17999>\
**Category:** Ansible Project\
**Created:** [April 16, 2015, 11:51pm UTC](https://forum.ansible.com/t/my-library-modules-stopped-working-after-1-8/17999 "2015-04-16T23:51:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtovey](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mtovey](https://forum.ansible.com/u/mtovey)\
**Post date:** [April 16, 2015, 11:51pm UTC](https://forum.ansible.com/t/my-library-modules-stopped-working-after-1-8/17999/1 "2015-04-16T23:51:26Z")

</div>

Prior to release 1.8, a module named ‘mytest’ that contained the following worked perfectly:

#!/bin/ksh

echo ‘changed=True msg=OK’  
exit 0

The command ‘ansible server -m mytest -M my\_library’ would return:

server | success \>\> {  
“changed”: true,  
“msg”: “OK”  
}

But as of release 1.8, the same command returns:

server | FAILED \>\> {  
“failed”: true,  
“msg”: “changed=True msg=OK\r\n”,  
“parsed”: false  
}

So, what changed and what must I do to make it all work again? I have looked but can’t seem to locate any mention of anything about this in the release notes. It is probably there and I am just not recognizing it. Can somebody please direct me to where I can find information on this?  
Thanks,  
-Mark

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 17, 2015, 12:36am UTC](https://forum.ansible.com/t/my-library-modules-stopped-working-after-1-8/17999/2 "2015-04-17T00:36:12Z")

</div>

“BabyJSON” as it was called was removed in 1.8. As such, modules must return actual JSON in responses and not the key=value responses.

---

<div class="post-metadata">

**Author:** ![mtovey](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mtovey](https://forum.ansible.com/u/mtovey)\
**Post date:** [April 17, 2015, 3:21am UTC](https://forum.ansible.com/t/my-library-modules-stopped-working-after-1-8/17999/3 "2015-04-17T03:21:51Z")

</div>

Okay, that explains it. Now can you point me at a good reference that will explain what that should look like? Obviously, I am not familiar with it.  
Thanks,  
-Mark

---

<div class="post-metadata">

**Author:** ![mtovey](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mtovey](https://forum.ansible.com/u/mtovey)\
**Post date:** [April 17, 2015, 3:49am UTC](https://forum.ansible.com/t/my-library-modules-stopped-working-after-1-8/17999/4 "2015-04-17T03:49:38Z")

</div>

Found it. This:

#!/bin/ksh

echo ‘{“changed”: “True”, “msg”: “OK”}’  
exit 0

now returns:

server | success \>\> {  
“changed”: “True”,  
“msg”: “OK”  
}

Easy enough to correct.  
Thanks,  
-Mark

---

<div class="post-metadata">

**Author:** ![mtovey](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mtovey](https://forum.ansible.com/u/mtovey)\
**Post date:** [April 19, 2015, 4:34am UTC](https://forum.ansible.com/t/my-library-modules-stopped-working-after-1-8/17999/5 "2015-04-19T04:34:48Z")

</div>

This works even better. I get the correct colors with this:

#!/bin/ksh

echo ‘{  
“changed”: true,  
“msg”: “OK”  
}’  
exit 0

-Mark
