Yes, at first I thought the jinja2 docs would be authoritative and so that’s cool.
But my brain also prefers better docs with examples.
Is this something a beginner like me can tackle?
I’m happy to learn how to contribute to these page myself, if I can figure out how to get started.
A bit more on my issue with ansible.builtin.map -
I find you’ve got to twiddle the Jinja2 way to get to the Ansible way. Template Designer Documentation — Jinja Documentation (3.1.x) contains Jinja2 speak. jinja-filters.map(*value: Iterable[Any]* , **args: Any* , ***kwargs: Any* ) → Iterable[Any] - sorry, what?
Also, there’s no CLI help - I was working offline yesterday, so the web was not an option. Doc command ansible-doc -t filter -l (and ansible-navigator doc -t filter -l) missed out the map filter.
vboxuser@fedoravm:~$ ansible-doc -t filter -l
...
ansible.builtin.log
ansible.builtin.mandatory <----- where is ansible.builtin.map?
ansible.builtin.md5
ansible.builtin.normpath
...
Also, there’s no CLI help - I was working offline yesterday, so the web was not an option.
It was added in 2.19. The changelog includes ansible-doc - Return dynamic stub when reporting on Jinja filters and tests not explicitly documented in Ansible.
It is my hope that we will make these stubs completely dynamic in a future release. As such, there would additionally be no functionality for adding per filter documentation for filters we don’t own.