Outdated docs on collections

The docs say things like to have at least an empty __init__.py, but the stock collections like community.general don’t have one. Instead, they have lots of complex files (JSON in toplevel, YAML and text in meta/, …).

Are the docs outdated and/or incomplete?

1 Like

__init__.py isn’t necessary, maybe it was a long time ago? This was added 10 years ago in Docs partner checklist (bulk modules) (#20794) · ansible/ansible-documentation@cd6792a · GitHub (and migrated at some point to collections), maybe it was different then?

3 Likes

__init__ was required when doing sub directories for ‘adjacent’ plugins (might still be, need to check), but collections for core >2.10 should not need it anymore.

4 Likes

@mirabilos community.general (and community.network) are not the best examples.

I’d look at the other Community Collections

1 Like

Perhaps, but community.docker is the one I’m interested in how it works, since I need to fork and rename 3.13.10 for access to the older docker compose module for Debian bookworm and older.

(In retrospect, upgrading the control node to trixie was a mistake, but then, we had to do that to be able to manage trixie targets…)

@mirabilos How do you think we can improve the docs, any suggestion for improved wording?

By documenting how to make a collection for Ansible 2.19/12 and the meta files.