Closed rwhector closed 2 years ago
Correction: After discussions elsewhere, I acknowledge that ansible-doc doesn't crash. It exits with an exception:
"ERROR! Unexpected Exception, this is probably a bug: 'description'"
@rwhector How exactly is this run? Can you please provide an example, and I can create a test case?
Just pushed a PR which fixes this issue.
richard@zircon:~/ansible$ ansible-doc -t connection lxc_ssh
I should also mention I'm using ansible from debian buster-backports, which has debian version 2.9.16+dfsg-1~bpo10+2. It's possible newer ansible versions avoid this exception. (edit: oops, I had already mentioned that)
richard@zircon:~/ansible$ ansible-doc -t connection lxc_ssh
This can't be the full story, when I run this in this git repository it just throws an error message.
I'm not worried about the exception, that's an ansible-doc problem. But if I can add a new test for the documentation then let's do this.
I'm running that in the root of my ansible configuration, where ansible.cfg, host, and all my plays and roles live. But when I run it in the git checkout, I still get the exception.
Further details:
ansible.cfg has the line: connection_plugins = /home/richard/.ansible/plugins/connection
And that directory is where I put the git clone:
/home/richard/.ansible/plugins/connection/ansible-lxc-ssh
It's not actually where I originally cloned it; I had to do lots of experimenting to figure out how to get it to be found at all, but that's my lack of understanding of how ansible plugins work (and mistaking a '_' for a '- ). So I copied it around and renamed it a few times before settling on the above location.
Maybe I should try a newer ansible?
The problem is rather that you test that in an existing Playbook directory, and I try to test that in the repository - which is not a Playbook directory.
Have to see how I can create a test case from this.
In the documentation section, the pipelining option starting at line 270, has no 'description' key. ansible-doc references that at line 509 of ../ansible/cli/doc.py (as supplied with debian buster ansible package 2.9.16+dfsg-1~bpo10+2) I suspect that means both files have bugs? ie the option should have a description, and ansible-doc shouldn't crash if it doesn't