Hello, Community
I was looking for documentation for ansible-pligins by CLI, but it happends that in version of ansible i can´t consult them, `ansible-doc -t filter ipaddr` i ran the next command, but it shows an error that option doesent exists in this ansible version. it's there any option, package, etc, to be setted or installed to consult them by CLI, or not?.
kind regards!!
Hi @Dave_ross
Every plugin/filter/module has documentation. ipaddr filter is part of the ansible.utils collection. You can find the documentation like this:
$ ansible-navigator collections (use execution environment image which has ansible.utils collection, e.g. ee-supported-rhel8)
As you can see, ansible.utils collection has number 7, so type "7"
Find ipaddr filter, as you can see it has number 7 (you can type :f ipaddr)
Then type 0
Here you can find documentation for the mentioned filter and examples.
Another way to find documentation is to manually download the collection. Filters are placed in plugins sub-dir of the collection's dir. There is a README.md file there that contains documentation and examples.
So currently, we can't use the "/" for searching in the ansible-navigator interactive mode. If you want to do things like that you can use STDOUT mode and the cli. If you are in navigator, you're stuck with the features and functions provided.
There is and might be a way in the future as I thought this had been something reported, so it was added to the project board in 2023.
https://github.com/ansible/ansible-navigator/issues/441
Even if this would get resolved in a new version of Navigator, it wouldn't make it into the current version of the RH294 Ansible course as it won't have packages changed until the next update and newer Ansible Navigator versions take time to make it into the official supported AAP2 channels.
Hi, While preparing for the exam, I faced the same problem.
It seems that You can check the syntax of the jinja2 filters only online.
The key pages are:
https://docs.ansible.com/ansible/2.9/user_guide/playbooks_filters.html#filters
https://docs.ansible.com/ansible/8/playbook_guide/playbooks_filters.html#playbooks-filters
https://docs.ansible.com/ansible/latest/collections/index_filter.html
hth
Hi @Dave_ross
Every plugin/filter/module has documentation. ipaddr filter is part of the ansible.utils collection. You can find the documentation like this:
$ ansible-navigator collections (use execution environment image which has ansible.utils collection, e.g. ee-supported-rhel8)
As you can see, ansible.utils collection has number 7, so type "7"
Find ipaddr filter, as you can see it has number 7 (you can type :f ipaddr)
Then type 0
Here you can find documentation for the mentioned filter and examples.
Another way to find documentation is to manually download the collection. Filters are placed in plugins sub-dir of the collection's dir. There is a README.md file there that contains documentation and examples.
Nice!, thanks for the documentation!.
So currently, we can't use the "/" for searching in the ansible-navigator interactive mode. If you want to do things like that you can use STDOUT mode and the cli. If you are in navigator, you're stuck with the features and functions provided.
There is and might be a way in the future as I thought this had been something reported, so it was added to the project board in 2023.
https://github.com/ansible/ansible-navigator/issues/441
Even if this would get resolved in a new version of Navigator, it wouldn't make it into the current version of the RH294 Ansible course as it won't have packages changed until the next update and newer Ansible Navigator versions take time to make it into the official supported AAP2 channels.
thanks @Travis for clearing this up!
but many filter cannot find in the method, e.g. e64encode, so it;s not in builtin now?
Even "ansible-doc --type filter ansible.builtin.b64encode" (without execution environments) doesn't work for you?
AFAIK, the "filter" type is not available in the version of ansible available in the course and the exam (ansible core 2.13.4).
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.