"External factors" are tool chains that assume everything under ./collections except for ./collections/requirements.yml are not local to the project. These need to be made smarter, incorporating `git ls-files` and friends for that determination.
If it really is a no-go — which seems to be what you're saying — then I can quit digging this hole and put the effort into upgrading/fixing borken local tools. That needs to happen anyway, and apparently sooner rather than later. Thanks. On Tuesday, September 5, 2023 at 2:28:32 PM UTC-4 Matt Martz wrote: > It only works for modules(library) and module_utils in the structure of a > project local, adjacent directories. > > To use them for other plugin types, you need to use a collection > structure, but there is no reason it cannot just be local like you > otherwise would with `library` and `module_utils` dir. Dunno what the > "external factors" are. > > On Tue, Sep 5, 2023 at 1:24 PM Todd Lewis <[email protected]> wrote: > >> Does a local, project specific ./module_utils directory only work for >> sharing code between Ansible modules, or can it host shared python code for >> other types of plugins? >> >> I'm trying to share a bit of code between a test plugin and a related >> filter plugin. It's not working, and I can't tell if it's because I'm doing >> something wrong vs. "it isn't supposed to work" that way. >> >> Full disclosure: I did get this working by putting the test and filter >> code into a local collection structure under >> ./collections/ansible_collections/my/local/{test,filter}/foo.py, but there >> are "external factors" preventing me from adopting that solution just yet. >> Besides, I really want to understand how this could work either way. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/3a11f1af-f3a6-4b7b-9c23-ab1773a4c5ccn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/3a11f1af-f3a6-4b7b-9c23-ab1773a4c5ccn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Matt Martz > @sivel > sivel.net > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/69154d25-3093-4e19-a2a3-9be92197d3e8n%40googlegroups.com.
