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

Allow use of when with meta/main.yml #306

Merged
merged 1 commit into from
Jun 9, 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
20 changes: 18 additions & 2 deletions f/ansible-meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@
"type": "string"
},
"when": {
"title": "When",
"type": "string"
"$ref": "#/$defs/complex_conditional",
"title": "When"
}
},
"title": "Dependency entry",
Expand Down Expand Up @@ -1098,6 +1098,22 @@
"title": "aosPlatformModel",
"type": "object"
},
"complex_conditional": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
},
"eosPlatformModel": {
"properties": {
"name": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"params": {
"missingProperty": "role"
},
"schemaPath": "#/$defs/DependencyModel/anyOf/0/required"
"schemaPath": "#/anyOf/0/required"
},
{
"instancePath": "/dependencies/0",
Expand All @@ -27,7 +27,7 @@
"params": {
"missingProperty": "src"
},
"schemaPath": "#/$defs/DependencyModel/anyOf/1/required"
"schemaPath": "#/anyOf/1/required"
},
{
"instancePath": "/dependencies/0",
Expand All @@ -36,14 +36,14 @@
"params": {
"missingProperty": "name"
},
"schemaPath": "#/$defs/DependencyModel/anyOf/2/required"
"schemaPath": "#/anyOf/2/required"
},
{
"instancePath": "/dependencies/0",
"keyword": "anyOf",
"message": "must match a schema in anyOf",
"params": {},
"schemaPath": "#/$defs/DependencyModel/anyOf"
"schemaPath": "#/anyOf"
},
{
"instancePath": "",
Expand Down
7 changes: 7 additions & 0 deletions test/roles/maximum/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
allow_duplicates: true
galaxy_info:
description: maximum
min_ansible_version: "2.9"
Expand All @@ -9,3 +10,9 @@ galaxy_info:
- name: Alpine
versions:
- all
dependencies:
- role: foo
vars: {}
when:
- foo
- bar