The gist, here you’ll be able to find the sourcecome of my module.
What I’m trying to do, is make a module that uses freeipa’s api to add dns record.
Now the module does everything it should, but I keep getting a failed because my output isn’t parsed as it should.
That is pretty weird.
Can you have a look at the generated module in : /home/exh345/.ansible_module_generated ?
See if perhaps you see some weird characters? Also check the encoding of that file, I’d expect it to be plain ASCII.
Which version of ansible you used? Can you check on latest dev or another versions?
Indeed, in the generated version, no strange characters.
The generated file: https://gist.github.com/TimothyVandenbrande/ec1f692a7b9ad93350db
I’m currently using ansible 1.7.1 but have the same problem on the devel and the 1.5.4 version.
Also something I discovered is when I comment ‘api.finalize()’ (line25) and let it exit just below it, it seems to give the output as it is supposed to.
To me it looks like something in the freeipa api is interfering with the parsing modules in ansible, but unfortunately, I can’t see what or why.
2 things I wanted to mention, but have no specific recommendations for are:
- The sequence ‘\u001b[?1034h’ is the ‘meta_on’ shell escape sequence or the equivalent of pressing the ‘alt’ key
- ‘Killed by signal 1.’ indicates that the process received a SIGHUP from an external source.
Both of these are rather odd. I wouldn’t expect that escape sequence unless something was trying to manipulate the shell, and I have no idea why the process would have received a SIGHUP from an external source.
The killed by signal 1 happens on every action,
but now it gets parsed, which it shouldn’t.
And I believe the 1st part (the alt key/meta_on) is what’s bugging everything else.
and because if you check the raw part in the test module, you’ll notice that the output is what it should be, but bugs once it gets parsed by ansible.
Now, if I run this module in my playbook with ignore_errors: true, it does everything as designed, but it isn’t the way it should, so I’d like to fix it.
Especially since I have a del module too with the same issues.
(which once without errors will be made public ofcourse, since I also noticed some people asking for a dns/ipa module too)
seems I’m not the only one clueless here…