Is there a way to denote modules/plugins that are private to a collection?

18 views
Skip to first unread message

Rich Megginson

unread,
Sep 24, 2020, 1:12:48 PM9/24/20
to Ansible Development
The linux-system-roles project has several roles that have modules that
are used in the implementation of the role.  However, once we convert to
collections, all of these modules will be part of the public API of the
collection.  Is there some way we can mark these modules as not usable
or not supported outside of the collection (other than documentation)? 
For example, internal module names begin with an underscore?

collections/ansible_collections/fedora/system_roles/plugins/modules/_network_connections.py

?

Matt Martz

unread,
Sep 24, 2020, 1:14:45 PM9/24/20
to Rich Megginson, Ansible Development
There is no way to do this.  An underscore is just an underscore in plugin names in a collection, and there are no common patterns that denote such a thing is private.

--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/23da5fe7-7689-00c5-ae50-06dc116cff2a%40redhat.com.


--
Matt Martz
@sivel
sivel.net

Rich Megginson

unread,
Sep 24, 2020, 1:44:02 PM9/24/20
to ansibl...@googlegroups.com
On 9/24/20 11:14 AM, Matt Martz wrote:
There is no way to do this.  An underscore is just an underscore in plugin names in a collection,and there are no common patterns that denote such a thing is private.


This issue keeps coming up again and again in system roles, but apparently no one else in the Ansible community has a need to keep parts of the collection api private?  No one else has an issue with users of a collection using code in the collection that is not intended to be used directly?  Or is it an implicit assumption of collection designers that any piece of code shipped in a collection must handle the case where a user will use it directly?



On Thu, Sep 24, 2020 at 12:12 PM Rich Megginson <rmeg...@redhat.com> wrote:
The linux-system-roles project has several roles that have modules that
are used in the implementation of the role.  However, once we convert to
collections, all of these modules will be part of the public API of the
collection.  Is there some way we can mark these modules as not usable
or not supported outside of the collection (other than documentation)? 
For example, internal module names begin with an underscore?

collections/ansible_collections/fedora/system_roles/plugins/modules/_network_connections.py

?

--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/23da5fe7-7689-00c5-ae50-06dc116cff2a%40redhat.com.


--
Matt Martz
@sivel
sivel.net
--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages