Skip to content
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

Unable to load filter_plugin inside tests #91

Open
Roshna-Raman opened this issue Jan 23, 2019 · 2 comments
Open

Unable to load filter_plugin inside tests #91

Roshna-Raman opened this issue Jan 23, 2019 · 2 comments
Assignees

Comments

@Roshna-Raman
Copy link

I m not able to load filter_plugins in tests without specifying filter plugin explicitly inside ansible.cfg.
https://github.com/Roshna-Raman/cisco_ios/tree/remotes/origin/f/parser_show_ip_route

$ ansible --version
ansible 2.7.5

Fail Log:
cisco_ios/tests/parser_templates/cli/show_ip_route_vrf_all/main.yaml:3
Wednesday 23 January 2019 22:16:09 +1000 (0:00:00.024) 0:00:00.062 *****
fatal: [localhost]: FAILED! =>
msg: 'template error while templating string: no filter named ''expand_routing_protocol_name''. String: {{ { nested_item.prefix+nested_item.mask: { ''subnet'': nested_item.prefix, ''mask'': nested_item.mask, ''protocol'': nested_item.prot | expand_routing_protocol_name, ''dist_metric'': nested_item.metric, ''next_hop'': ([nested_item.next_hop_nbr]+[nested_item.next_hop_int, nested_item.next_hop_int_sum]) | reject(''equalto'', '''') | list } } }}'
to retry, use: --limit @/home/4039467/work/cisco_ios/tests/test_parser_templates.retry

If I add 'filter_plugins = filter_plugins' in ansible.cfg, I get the expected result without any failures.
Please suggest if it is required to mention filter_plugins explicitly, as my understanding is that it should be taken care without the need to mention in ansible.cfg.

@rcarrillocruz
Copy link
Contributor

Can you please share the playbook you are using and how you are running ansible-playbook?

@Roshna-Raman
Copy link
Author

HI,
I am executing palybook from cisco-ios as 'ansible-playbook tests/test_parser_templates.yaml -i inventory -vvv'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants