The future of deep collection folder structures

15 views
Skip to first unread message

Uli Wolf

unread,
Feb 10, 2023, 2:09:18 PM2/10/23
to Ansible Development
Dear Ansible Developers,

We developed quite a number of collections which utilize the deep folder structure to organize the content. Example:

#################################
├── playbooks/
│   ├── db/
│   │   ├── client/
│   │   │   └── deploy_software.yml
│   │   └── server/
│   │       └── deploy_software.yml
│   └── ...
├── plugins/
│   ├── action/
│   │   ├── db/
│   │   │   └── foo.py
│   │   └── app/
│   │       └── backend/
│   │           └── api.py
│   └── ...
└── ...  
#################################

To us the benefit is the clear organization of plugins and playbooks (among many other nice things).

Recently many of the community collections have been reorganized (afaik by Felix Fontein) to have a flat structure again. On the other hand tools like ansible-lint have been fixed to fully support deep structures.

My questions to you is: What the the future of deep structures in collections?

Thanks in advance!

Best Regards,
Uli

Felix Fontein

unread,
Feb 10, 2023, 2:53:50 PM2/10/23
to ansibl...@googlegroups.com
Hi Uli,
deep structures are fully supported. (I don't know whether they work
for playbooks or roles - I've never tried them there - but they
definitely work for plugins and modules, and I'm not aware of any plans
to change that.)

The reason we removed that structure for community.general and
community.network was that the structure there was never intended to be
seen by users. It was only used to structure the content of the
collection (c.g has 568 modules) so modules covering similar topics are
in the same directory, making development of the collection easier.

Since it was no longer possible to hide this from users, we decided to
remove the structure.

Best regards,
Felix


Uli Wolf

unread,
Feb 10, 2023, 3:11:57 PM2/10/23
to Ansible Development
Hi Felix,

Thanks for your quick reply and that is great!

We actually love deep structures and are very happy to hear that they are not going away. Btw they work perfectly for playbooks as well (haven't tried it for roles though).

Thanks again & best regards,
Uli

Brian Coca

unread,
Feb 21, 2023, 11:34:31 AM2/21/23
to Uli Wolf, Ansible Development
While we support the deep structures, we do not recommend their use,
having more small more targeted collections is generally better than
having one huge one. community.general itself is an exception as it
was a dumping ground for all the old core plugins that could not find
a home in their own collection.
--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages