Generating html module docs locally?

I wanted to take a stab at https://github.com/ansible/ansible/issues/21556. I tried doing “make webdocs” against devel (7bf56cee), and got the following error:

rendering: include_role
Traceback (most recent call last):
File “…/…/hacking/module_formatter.py”, line 487, in
main()
File “…/…/hacking/module_formatter.py”, line 474, in main
result = process_module(modname, options, env, template, outputname, module_map, aliases)
File “…/…/hacking/module_formatter.py”, line 327, in process_module
raise AnsibleError(“Failed to render doc for %s: %s” % (fname, str(e)))
ansible.errors.AnsibleError: Failed to render doc for …/…/lib/ansible/modules/core/utilities/logic/include_role.py: Could not process ({u"As with C(include) this task can be static or dynamic, If static it implies that it won’t need templating nor loops nor conditionals and will show included tasks in the --list options. Ansible will try to autodetect what is needed, but you can set static": u'yes|no at task level to control this.'}) : expected string or buffer
make[1]: *** [modules] Error 1
make: *** [webdocs] Error 2

Anybody have any insight as to why this might fail locally? I’m running on macOS.

Lorin

If you are working against the devel branch, then I suspect you have
stale lib/ansible/module/core and lib/ansible/module/extra dirs.

Failed to render doc for
../../lib/ansible/modules/core/utilities/logic/include_role.py

     ^ there is no /core/ path in devel any more

So likely trying to render docs for an older module and failing.

Yup, that was it. I had some stale dirs that were being masked by .gitignore. It’s working now. Thanks for the help.

Lorin