-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No example how to use textfsm with network-engine. #200
Comments
@jwoogee Hi, your playbook is not explicit enough to understand what module you are using. Will you please add the information?
|
sorry,
I’m using the ansible-network.cisco-ios role to attempt this. Maybe this
needs to be posed on a different github page?
I do understand how to call textfsm directly, but with the get_fact section
of the Cisco iOS role it gives the option to use different parser templates
to fine tune what facts you get, but it doesn’t explain how to use textfsm
in this way, although they say you can.
Thank you,
On Wed, Nov 21, 2018 at 10:02 PM Trishna Guha ***@***.***> wrote:
@jwoogee <https://github.com/jwoogee> what module are you using?
textfsm_parser needs an argument called name to have ansible_facts
generated
https://github.com/ansible-network/network-engine/blob/devel/docs/user_guide/textfsm_parser.md#sample-playbooks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#200 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZrdK-z-3FS7YGqtoLigRP1vEV4m6IyLks5uxiHGgaJpZM4Ytr2Q>
.
--
Jonathon Woods
|
I found the issue, the ansible-network.cisco_ios role doesn't have a spot to use name for textfsm templates, and the cli module in ansible-network.network-engine doesn't take name and use it either, so as far as I can see you can't use textfsm in the way the ciso_ios role expects. I can submit a PR with my changes that made it work for me. |
Thanks for the details. This needs to be fixed in |
Thanks! I created a PR for what works for me, and in Network-engine, that
was editing the cli action plugin. It’s PR #202.
On Fri, Nov 23, 2018 at 11:05 PM Trishna Guha ***@***.***> wrote:
Thanks for the details. This needs to be fixed in cli action plugin
instead. I will open a PR when the fix is ready.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#200 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZrdK1KMdQ7QXrKOvXvcc0vO4Qj64-x8ks5uyNN9gaJpZM4Ytr2Q>
.
--
Jonathon Woods
|
ISSUE TYPE
ANSIBLE VERSION
Network OS
SUMMARY
I'm trying to use a textfsm template with network-engine to populate ansible_facts. I cannot find documentation how to supply the fact name to supply, and the facts are not showing in ansible_facts.
I added show_interfaces_status.template to parser_templates/cli folder. I'm just not sure how to register that json dictionary now.
STEPS TO REPRODUCE
EXPECTED RESULTS
I expect ansible facts to be populated.
ACTUAL RESULTS
command runs without issue, but ansible_facts aren't updated. It's pretty clear I'm not setting the facts through the course of this, but I don't know how I'm supposed to using textfsm vs command_parser.
The text was updated successfully, but these errors were encountered: