Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

meta: allow use of collections key #244

Merged
merged 1 commit into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions f/ansible-meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,14 @@
"title": "Allow Duplicates",
"type": "boolean"
},
"collections": {
"items": {
"markdownDescription": "See [Using collections in roles](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#using-collections-in-roles) and [collection naming conventions](https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_in_groups.html#naming-conventions)",
"pattern": "^[a-z_]+\\.[a-z_]+$",
"type": "string"
},
"type": "array"
},
"dependencies": {
"items": {
"$ref": "#/definitions/DependencyModel"
Expand Down
10 changes: 10 additions & 0 deletions negative_test/roles/meta_invalid_collection/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
collections:
- foo # invalid pattern
galaxy_info:
description: foo
license: bar
min_ansible_version: "2.10"
platforms:
- name: Fedora
versions:
- all
10 changes: 10 additions & 0 deletions negative_test/roles/meta_invalid_collections/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
collections:
- FOO.BAR # invalid pattern, need to use lowercase
galaxy_info:
description: foo
license: bar
min_ansible_version: "2.10"
platforms:
- name: Fedora
versions:
- all
2 changes: 2 additions & 0 deletions test/roles/foo/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
collections:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
collections:
collections:
- foo_bar.foo_bar

I would use a case with an underscore.

- foo.bar
dependencies:
- name: ansible-role-foo
version: "1.0"
Expand Down