-
Notifications
You must be signed in to change notification settings - Fork 183
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
Ansible filters #104
base: main
Are you sure you want to change the base?
Ansible filters #104
Conversation
jinja2cli/cli.py
Outdated
from ansible.plugins.filter.core import FilterModule | ||
|
||
return FilterModule().filters() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we try...except ImportError
and print a more useful message to say that ansible-core
is missing? Just so we can suggest how to resolve the issue.
Added import error message when `Ansible Core` is not installed (and `--ansible` is used). Importing all filters from `ansible.plugins.filter`.
Filters in ansible always seem to be contained under the following structure: |
What's up dude? |
Hey man, how's it going? |
Hi,
This adds support for Ansible filters (without importing each one manually like you would have to do with #86 ?).
This would also solve #91 and #85 (and my need to use the Ansible
password_hash
filter).Maybe you could look at it and tell me if there are things that need to be fixed?
Thanks