Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated schemas #2206

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 37 additions & 2 deletions src/ansiblelint/schemas/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 @@ -832,6 +832,25 @@
"title": "OpenBSDPlatformModel",
"type": "object"
},
"OpenWRTPlatformModel": {
"properties": {
"name": {
"const": "OpenWRT",
"title": "Name",
"type": "string"
},
"versions": {
"default": "all",
"items": {
"enum": ["17.01", "18.06", "19.07", "21.02", "all"],
"type": "string"
},
"type": "array"
}
},
"title": "OpenWRTPlatformModel",
"type": "object"
},
"PAN-OSPlatformModel": {
"properties": {
"name": {
Expand Down Expand Up @@ -1079,6 +1098,22 @@
"title": "aosPlatformModel",
"type": "object"
},
"complex_conditional": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
},
"eosPlatformModel": {
"properties": {
"name": {
Expand Down
145 changes: 73 additions & 72 deletions src/ansiblelint/schemas/playbook.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"title": "Name",
"type": "string"
},
"tags": {
"$ref": "#/$defs/tags"
},
"vars": {
"title": "Vars",
"type": "object"
Expand Down Expand Up @@ -171,8 +174,7 @@
"$ref": "#/$defs/templated-boolean"
},
"port": {
"title": "Port",
"type": "integer"
"$ref": "#/$defs/templated-integer"
},
"remote_user": {
"title": "Remote User",
Expand All @@ -197,26 +199,16 @@
"title": "Run Once"
},
"tags": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"$ref": "#/$defs/tags",
"title": "Tags"
},
"throttle": {
"$ref": "#/$defs/templated-integer",
"title": "Throttle"
},
"timeout": {
"title": "Timeout",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Timeout"
},
"vars": {
"title": "Vars",
Expand Down Expand Up @@ -361,8 +353,8 @@
"type": "boolean"
},
"gather_timeout": {
"title": "Gather Timeout",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Gather Timeout"
},
"handlers": {
"$ref": "#/$defs/tasks"
Expand Down Expand Up @@ -414,8 +406,8 @@
"type": "string"
},
"port": {
"title": "Port",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Port"
},
"post_tasks": {
"$ref": "#/$defs/tasks"
Expand Down Expand Up @@ -478,17 +470,7 @@
"type": "string"
},
"tags": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"$ref": "#/$defs/tags",
"title": "Tags"
},
"tasks": {
Expand All @@ -499,8 +481,8 @@
"title": "Throttle"
},
"timeout": {
"title": "Timeout",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Timeout"
},
"vars": {
"title": "Vars",
Expand Down Expand Up @@ -606,8 +588,8 @@
"$ref": "#/$defs/templated-boolean"
},
"port": {
"title": "Port",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Port"
},
"remote_user": {
"title": "Remote User",
Expand All @@ -622,26 +604,16 @@
"title": "Run Once"
},
"tags": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"$ref": "#/$defs/tags",
"title": "Tags"
},
"throttle": {
"$ref": "#/$defs/templated-integer",
"title": "Throttle"
},
"timeout": {
"title": "Timeout",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Timeout"
},
"vars": {
"title": "Vars",
Expand All @@ -658,13 +630,55 @@
"title": "play-role",
"type": "object"
},
"tags": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"title": "Tags"
},
"task": {
"additionalProperties": true,
"not": {
"required": [
"block"
]
},
"allOf": [
{
"not": {
"required": [
"block"
]
}
},
{
"not": {
"required": [
"with_filetree"
]
},
"title": "with_filetree was moved to with_community.general.filetree in 2.10"
},
{
"not": {
"required": [
"with_flattened"
]
},
"title": "with_flattened was moved to with_community.general.flattened in 2.10"
},
{
"not": {
"required": [
"with_cartesian"
]
},
"title": "with_cartesian was moved to with_community.general.cartesian in 2.10"
}
],
"properties": {
"action": {
"title": "Action",
Expand All @@ -679,8 +693,8 @@
"title": "Args"
},
"async": {
"title": "Async",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Async"
},
"become": {
"$ref": "#/$defs/templated-boolean",
Expand Down Expand Up @@ -726,8 +740,8 @@
"type": "string"
},
"delay": {
"title": "Delay",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Delay"
},
"delegate_facts": {
"title": "Delegate Facts",
Expand Down Expand Up @@ -821,26 +835,16 @@
"title": "Run Once"
},
"tags": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"$ref": "#/$defs/tags",
"title": "Tags"
},
"throttle": {
"$ref": "#/$defs/templated-integer",
"title": "Throttle"
},
"timeout": {
"title": "Timeout",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Timeout"
},
"until": {
"title": "Until",
Expand All @@ -866,9 +870,6 @@
"with_first_found": {
"title": "With First Found"
},
"with_flattened": {
"title": "With Flattened"
},
"with_indexed_items": {
"title": "With Indexed Items"
},
Expand Down