Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Add new rule on files outside of meta/, plugins/, roles/, and playbooks/ #199

Merged
merged 3 commits into from
Mar 23, 2022

Conversation

felixfontein
Copy link
Contributor

SUMMARY

Implements ansible-community/community-topics#77. Once that is approved (and word-smithing has been done here), this can be merged.

ISSUE TYPE
  • Docs Pull Request
  • Feature Pull Request
COMPONENT NAME

collection requirements

collection_requirements.rst Outdated Show resolved Hide resolved
collection_requirements.rst Outdated Show resolved Hide resolved
felixfontein and others added 2 commits March 14, 2022 12:45
@felixfontein felixfontein changed the title [WIP] Add new rule on files outside of meta/, plugins/, roles/, and playbooks/ Add new rule on files outside of meta/, plugins/, roles/, and playbooks/ Mar 23, 2022
@felixfontein felixfontein merged commit 3553202 into main Mar 23, 2022
@felixfontein felixfontein deleted the outside-files branch March 23, 2022 19:09
@felixfontein
Copy link
Contributor Author

@Andersson007 thanks for reviewing this!

Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested alternative wording.

Comment on lines +162 to +164
Collections MUST not use files outside ``meta/``, ``plugins/``, ``roles/`` and ``playbooks/`` in public plugins, roles and playbooks they contain. A collection must work if every file or directory is deleted from the installed collection except these directories and their contents.

In the previous paragraph, `"public"` means that internal plugins, roles and playbooks are not affected. Internal means that they are part of tests, only used to release the collection, etc. Everything that can be used from other collections or user playbooks and roles, as well as playbooks that can be called by FQCN, is public.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Collections MUST not use files outside ``meta/``, ``plugins/``, ``roles/`` and ``playbooks/`` in public plugins, roles and playbooks they contain. A collection must work if every file or directory is deleted from the installed collection except these directories and their contents.
In the previous paragraph, `"public"` means that internal plugins, roles and playbooks are not affected. Internal means that they are part of tests, only used to release the collection, etc. Everything that can be used from other collections or user playbooks and roles, as well as playbooks that can be called by FQCN, is public.
Collections MUST not use files outside ``meta/``, ``plugins/``, ``roles/`` and ``playbooks/`` in any plugin, role, or playbook that can be called by FQCN, used from other collections, or used from user playbooks and roles. A collection must work if every file or directory is deleted from the installed collection except these directories and their contents.
Internal plugins, roles and playbooks (artifacts used only in testing, or only to release the collection, or only for some other internal purpose and not used externally) are exempt from this rule and may rely on files in other directories.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants