# Building html documentation for standalone local module: where to find Makefile?

**URL:** <https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915>\
**Category:** Get Help\
**Tags:** documentation\
**Created:** [February 16, 2024, 10:05pm UTC](https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915 "2024-02-16T22:05:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![spike](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@spike](https://forum.ansible.com/u/spike)\
**Post date:** [February 16, 2024, 10:05pm UTC](https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915/1 "2024-02-16T22:05:29Z")

</div>

Hi,

I’m currently reading through: [Testing plugin documentation — Ansible Documentation](https://docs.ansible.com/ansible/latest/dev_guide/testing_documentation.html#testing-module-documentation)

It says:

> 1. Build HTML from your module documentation: `MODULES=mymodule make webdocs`.

It might sound a little silly, but can somebody point me to that Makefile? I can’t find it in [GitHub - ansible/ansible: Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.](https://github.com/ansible/ansible/) and as far as I understand I can’t use `antsibull-docs` since it’s a standalone local module.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 16, 2024, 10:37pm UTC](https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915/2 "2024-02-16T22:37:35Z")

</div>

I think the last version of Ansible this worked for was 2.9. For ansible-base 2.10 / Ansible 2.10 the docs building process was completely changed, but this part of the documentation apparently was never updated accordingly.

Nowadays you should use a collection (you can have local collections next to your playbooks, similar to local modules), then you can use antsibull-docs + Sphinx to create HTML docs for your collection ([documentation](https://ansible.readthedocs.io/projects/antsibull-docs/collection-docs/)).

---

<div class="post-metadata">

**Author:** ![spike](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@spike](https://forum.ansible.com/u/spike)\
**Post date:** [February 17, 2024, 12:09am UTC](https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915/3 "2024-02-17T00:09:24Z")

</div>

I knew I’ve seen that Makefile somewhere in the past. Thanks!

> [@felixfontein](#):
>
> you can have local collections next to your playbooks, similar to local modules

I presume I have to change `COLLECTIONS_PATHS` accordingly (e.g. through `ansible.cfg`)? ansible doesn’t seem to look for collections next to the playbooks out of the box.

> [@felixfontein](#):
>
> you can use antsibull-docs + Sphinx to create HTML docs for your collection

Thanks a bunch!

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 17, 2024, 10:29am UTC](https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915/4 "2024-02-17T10:29:28Z")

</div>

> [@spike](#):
>
> I presume I have to change `COLLECTIONS_PATHS` accordingly (e.g. through `ansible.cfg`)? ansible doesn’t seem to look for collections next to the playbooks out of the box.

No, you only need to change that configuration (except if you want to place the collections somewhere else).

Iy you have a playbook in a directory, create a subdirectory structure `collections/ansible_collections/foo/bar/`. In that directory you can place the contents of the `foo.bar` collection (like `galaxy.yml`) If you run a playbook in the directory which contains `collections/`, ansible will find the `foo.bar` collection.

The nested `collections/ansible_collections/` structure is important (and also somewhat annoying 😉 ).

(It’s mentioned in the docs at the end of this section: [Installing collections — Ansible Documentation](https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html#installing-collections-with-ansible-galaxy). I guess it would make sense make that more prominent…)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 17, 2024, 10:56am UTC](https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915/5 "2024-02-17T10:56:01Z")

</div>

PR to remove/update the outdated parts on building module HTML docs: [Remove/update incorrect docs building documentation by felixfontein · Pull Request #1128 · ansible/ansible-documentation · GitHub](https://github.com/ansible/ansible-documentation/pull/1128)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [February 17, 2024, 11:01am UTC](https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915/6 "2024-02-17T11:01:12Z")

</div>

I created an issue for improving the docs for local collections: [Better document local collections for playbooks · Issue #1129 · ansible/ansible-documentation · GitHub](https://github.com/ansible/ansible-documentation/issues/1129)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 18, 2024, 11:01am UTC](https://forum.ansible.com/t/building-html-documentation-for-standalone-local-module-where-to-find-makefile/3915/7 "2024-03-18T11:01:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
