Skip to content

Commit

Permalink
collection roles dont support plugins (#79243)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoca committed Oct 27, 2022
1 parent bc83da9 commit 6ee089b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ A few recommendations when creating such playbooks, ``hosts:`` should be generic
This will have an implied entry in the ``collections:`` keyword of ``my_namespace.my_collection`` just as with roles.

.. note::
Playbook names, like other collection resources, have a restricted set of valid characters.
Names can contain only lowercase alphanumeric characters, plus _ and must start with an alpha character. The dash ``-`` character is not valid for playbook names in collections.
Playbooks whose names contain invalid characters are not addressable: this is a limitation of the Python importer that is used to load collection resources.
* Playbook names, like other collection resources, have a restricted set of valid characters.
Names can contain only lowercase alphanumeric characters, plus _ and must start with an alpha character. The dash ``-`` character is not valid for playbook names in collections.
Playbooks whose names contain invalid characters are not addressable: this is a limitation of the Python importer that is used to load collection resources.

* Playbooks in collections do not support 'adjacent' plugins, all plugins must be in the collection specific directories.
3 changes: 3 additions & 0 deletions docs/docsite/rst/playbook_guide/playbooks_reuse_roles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,9 @@ To use ``allow_duplicates: true`` with role dependencies, you must specify it fo
Embedding modules and plugins in roles
======================================

.. note::
This applies only to standalone roles. Roles in collections do not support plugin embedding; they must use the collection's ``plugins`` structure to distribute plugins.

If you write a custom module (see :ref:`developing_modules`) or a plugin (see :ref:`developing_plugins`), you might wish to distribute it as part of a role. For example, if you write a module that helps configure your company's internal software, and you want other people in your organization to use this module, but you do not want to tell everyone how to configure their Ansible library path, you can include the module in your internal_config role.

To add a module or a plugin to a role:
Expand Down

0 comments on commit 6ee089b

Please sign in to comment.