Skip to content

Commit

Permalink
meta: allow use of collections key
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Apr 29, 2022
1 parent d057e3f commit 29e33f3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
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:
- foo.bar
dependencies:
- name: ansible-role-foo
version: "1.0"
Expand Down

0 comments on commit 29e33f3

Please sign in to comment.