Need help regarding Ansible Role/Playbooks documentation

Hi Ansible Gurus,

I have many Ansible Roles and I want to document each and every variable of role with defaults values and their description and where they make sense?

Is there any better way of Documenting Ansible variables because in case roles have many variables it becomes very difficult for some one to document them manually in doc or pdf !

Regards
Rahul

It is just YAML you can do something like https://pypi.org/project/sphinxcontrib-yaml/ and I am sure there are parsing rules that could address variables.