User error or bug with cli_parse TTP and TextFSM usage? #49
-
Hello, I am trying to use the TTP and TextFSM parsers like such, this is my TTP task:
I have a valid ttp parser at the template_path specified, Ansible 3.0, with 2.10.6 base installed, ttp is installed, ttp works with python which is 3.8.2, this template works with this interpreter when utilized in a python script, I am receiving output from the cli_command in the previous task, which is using the Nokia Galaxy Collection module. I'm on Mac OS Big Sur, for what its worth. The collections are installed into a folder specified in ansible.cfg in my project, of /collections, when I run requirements.yml, which contains the collections in question, I receive the following, making me think I'm up to date and not missing anything:
When I run the playbook with -vvv, I receive the following
What am I missing? I get the same error if I try to use TextFSM, via utils.textfsm as the parser. Let me know if I can provide further details, would love to get this working. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Going through the code for If it still does not fic the issue can you please share the contents of |
Beta Was this translation helpful? Give feedback.
Going through the code for
ttp
andtextfsm
sub-plugins I can see an issue in code at line https://github.com/ansible-collections/ansible.utils/blob/main/plugins/sub_plugins/cli_parser/ttp_parser.py#L102 and https://github.com/ansible-collections/ansible.utils/blob/main/plugins/sub_plugins/cli_parser/textfsm_parser.py#L97 which returnserror
key in result whereas the expected key iserrors
(https://github.com/ansible-collections/ansible.utils/blob/main/plugins/action/cli_parse.py#L368). Please try to replaceerror
witherrors
in the sub-plugins at the line I shared. After that, it should print the template path that it is looking for.If it still does not fic the issue can you please share…