Just starting with Ansible, and in particular the vsphere_guest module, and I’m just a little perplexed by the errors I’m getting…
Any time I get an error from the module, it comes back as an undifferentiated blob of JSON, including ‘\n’'s displayed on screen.
For example, I forgot to add the “password:” line to a vsphere_guest: section, and I get back, what is on my screen, 12 lines of unformated json, filled with references to python files, soap schema’s, xml schema’s… I think possibly a reference for a good place to get kebabs after 2am in sydney, and right in the middle, the suggestion that “Got None for nillable(False), minOccurs(1) element (urn:vim25,password)” is a cause for concern.
Surely the “radically simple” approach would be to have said something like:
Missing required variable “password” in file X in task Y
Or something like that? I get that JSON’s a useful machine interchange format… but surely I’m doing something else wrong for it to be the user interface, especially without any attempt at ‘pretty printing’ the output?
It’s not just my own missing password issue that will generate this error… any error in the vshere_guest module seems to generate unformatted blobs of json.
Is this standard for Ansible? Or is it just this module?
I’ve seen older posts in the forums mentioning blobs of json output, and offering work-arounds to process '\n’s into line feeds to be somewhat more human parsable… is this really what’s needed?
I get far more useful, and readable, error messages out of gcc!