ansible/ansible — pull request #6460 by jsmartin (2014-03-13 01:56:28+00:00)
Title: Fixes various typos, fetch_url now working, changed command composure for wait_for_service

So there was a few things wrong with the module that seemed to crop up with 1.5.x:

some typographical errors related to validate_certs when defining the module parameters, as well as forgetting to set the variable itself.

fetch_url was not being imported.

Additionally, something odd became of the wait_for_service command it was continuously resulting in:

10.42.0.6 | FAILED >> {
"cmd": "'/\u0000\u0000\u0000u\u0000\u0000\u0000s\u0000\u0000\u0000r\u0000\u0000\u0000/\u0000\u0000\u0000s\u0000\u0000\u0000b\u0000\u0000\u0000i\u0000\u0000\u0000n\u0000\u0000\u0000/\u0000\u0000\u0000r\u0000\u0000\u0000i\u0000\u0000\u0000a\u0000\u0000\u0000k\u0000\u0000\u0000-\u0000\u0000\u0000a\u0000\u0000\u0000d\u0000\u0000\u0000m\u0000\u0000\u0000i\u0000\u0000\u0000n\u0000\u0000\u0000' '\u0000\u0000\u0000w\u0000\u0000\u0000a\u0000\u0000\u0000i\u0000\u0000\u0000t\u0000\u0000\u0000_\u0000\u0000\u0000f\u0000\u0000\u0000o\u0000\u0000\u0000r\u0000\u0000\u0000_\u0000\u0000\u0000s\u0000\u0000\u0000e\u0000\u0000\u0000r\u0000\u0000\u0000v\u0000\u0000\u0000i\u0000\u0000\u0000c\u0000\u0000\u0000e\u0000\u0000\u0000' '\u0000\u0000\u0000r\u0000\u0000\u0000i\u0000\u0000\u0000a\u0000\u0000\u0000k\u0000\u0000\u0000_\u0000\u0000\u0000k\u0000\u0000\u0000v\u0000\u0000\u0000' '\u0000\u0000\u0000r\u0000\u0000\u0000i\u0000\u0000\u0000a\u0000\u0000\u0000k\u0000\u0000\u0000@\u0000\u0000\u00001\u0000\u0000\u00000\u0000\u0000\u0000.\u0000\u0000\u00004\u0000\u0000\u00002\u0000\u0000\u0000.\u0000\u0000\u00000\u0000\u0000\u0000.\u0000\u0000\u00006\u0000\u0000\u0000'",
"failed": true,
"msg": "Traceback (most recent call last):\n File \"/home/vagrant/.ansible/tmp/ansible-tmp-1394673303.65-75463125268691/riak\", line 1332, in run_command\n cmd = subprocess.Popen(args, **kwargs)\n File \"/usr/lib64/python2.6/subprocess.py\", line 642, in __init__\n errread, errwrite)\n File \"/usr/lib64/python2.6/subprocess.py\", line 1234, in _execute_child\n raise child_exception\nTypeError: execv() argument 1 must be encoded string without NULL bytes, not str\n",
"rc": 257
}
The only way I was able to fix it was to compose the command as a list instead of a string. While debugging I did notice that if I hardcoded the command, it would work fine -- but using the %s string formatting would cause the exception.