summaryrefslogtreecommitdiffstats
path: root/test/schemas/negative_test/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'test/schemas/negative_test/playbooks')
-rw-r--r--test/schemas/negative_test/playbooks/environment.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/failed_when.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/gather_facts.yml.md34
-rw-r--r--test/schemas/negative_test/playbooks/gather_subset.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/gather_subset2.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/gather_subset3.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/gather_subset4.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/ignore-unreachable.yml13
-rw-r--r--test/schemas/negative_test/playbooks/ignore-unreachable.yml.md329
-rw-r--r--test/schemas/negative_test/playbooks/ignore_errors.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/import_playbook.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/import_playbook_exclusive.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/include.yml3
-rw-r--r--test/schemas/negative_test/playbooks/include.yml.md142
-rw-r--r--test/schemas/negative_test/playbooks/invalid-failed-when.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/invalid-serial.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/invalid.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/invalid_become.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/local_action.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/loop.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/loop2.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/no_log_partial_template.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/no_log_string.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/roles.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/run_once_list.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tags-mapping.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tags-number.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/args_integer.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/args_string.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/become_method_invalid.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/ignore_errors.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/invalid_block.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/local_action.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/loop.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/loop2.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/no_log_number.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/no_log_string.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/tags-mapping.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/tags-string.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/when_integer.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/when_object.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/with_items_boolean.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/tasks/with_items_untemplated_string.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/var_files_list_number.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/var_files_list_of_list_number.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/var_files_number.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/vars/asterisk.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/vars/dash-in-var-name.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/vars/list.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/vars/numeric-var-name.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/vars/play-keyword.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/vars/python-keyword.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/vars/varname-numeric-prefix.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/vas_prompt.yml.md6
-rw-r--r--test/schemas/negative_test/playbooks/when.yml.md6
56 files changed, 826 insertions, 1 deletions
diff --git a/test/schemas/negative_test/playbooks/environment.yml.md b/test/schemas/negative_test/playbooks/environment.yml.md
index 8923cb3..b34d039 100644
--- a/test/schemas/negative_test/playbooks/environment.yml.md
+++ b/test/schemas/negative_test/playbooks/environment.yml.md
@@ -91,6 +91,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/environment.yml",
@@ -101,6 +102,11 @@ stdout:
"path": "$[0]",
"message": "'environment', 'hosts' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].environment",
+ "message": "'{{ foo }}-123' is not of type 'object'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/failed_when.yml.md b/test/schemas/negative_test/playbooks/failed_when.yml.md
index e843e1f..c1c6e6c 100644
--- a/test/schemas/negative_test/playbooks/failed_when.yml.md
+++ b/test/schemas/negative_test/playbooks/failed_when.yml.md
@@ -118,6 +118,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/failed_when.yml",
@@ -128,6 +129,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].failed_when",
+ "message": "123 is not of type 'boolean'"
+ },
+ "num_sub_errors": 9,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/gather_facts.yml.md b/test/schemas/negative_test/playbooks/gather_facts.yml.md
index 0eb3a4b..6b8d90a 100644
--- a/test/schemas/negative_test/playbooks/gather_facts.yml.md
+++ b/test/schemas/negative_test/playbooks/gather_facts.yml.md
@@ -63,7 +63,25 @@
"params": {
"type": "boolean"
},
- "schemaPath": "#/properties/gather_facts/type"
+ "schemaPath": "#/oneOf/0/type"
+ },
+ {
+ "instancePath": "/0/gather_facts",
+ "keyword": "pattern",
+ "message": "must match pattern \"^\\{[\\{%](.|[\r\n])*[\\}%]\\}$\"",
+ "params": {
+ "pattern": "^\\{[\\{%](.|[\r\n])*[\\}%]\\}$"
+ },
+ "schemaPath": "#/$defs/full-jinja/pattern"
+ },
+ {
+ "instancePath": "/0/gather_facts",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/oneOf"
},
{
"instancePath": "/0",
@@ -84,6 +102,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/gather_facts.yml",
@@ -94,6 +113,11 @@ stdout:
"path": "$[0]",
"message": "'gather_facts', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].gather_facts",
+ "message": "'non' is not of type 'boolean'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0]",
@@ -113,7 +137,15 @@ stdout:
},
{
"path": "$[0].gather_facts",
+ "message": "'non' is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0].gather_facts",
"message": "'non' is not of type 'boolean'"
+ },
+ {
+ "path": "$[0].gather_facts",
+ "message": "'non' does not match '^\\\\{[\\\\{%](.|[\\r\\n])*[\\\\}%]\\\\}$'"
}
]
}
diff --git a/test/schemas/negative_test/playbooks/gather_subset.yml.md b/test/schemas/negative_test/playbooks/gather_subset.yml.md
index b426a23..5ee372b 100644
--- a/test/schemas/negative_test/playbooks/gather_subset.yml.md
+++ b/test/schemas/negative_test/playbooks/gather_subset.yml.md
@@ -84,6 +84,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/gather_subset.yml",
@@ -94,6 +95,11 @@ stdout:
"path": "$[0]",
"message": "'gather_subset', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].gather_subset",
+ "message": "'all' is not of type 'array'"
+ },
+ "num_sub_errors": 4,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/gather_subset2.yml.md b/test/schemas/negative_test/playbooks/gather_subset2.yml.md
index 8d6be68..d5ec667 100644
--- a/test/schemas/negative_test/playbooks/gather_subset2.yml.md
+++ b/test/schemas/negative_test/playbooks/gather_subset2.yml.md
@@ -230,6 +230,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/gather_subset2.yml",
@@ -240,6 +241,11 @@ stdout:
"path": "$[0]",
"message": "'gather_subset', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].gather_subset[0]",
+ "message": "'invalid' is not one of ['all', 'min', 'all_ipv4_addresses', 'all_ipv6_addresses', 'apparmor', 'architecture', 'caps', 'chroot,cmdline', 'date_time', 'default_ipv4', 'default_ipv6', 'devices', 'distribution', 'distribution_major_version', 'distribution_release', 'distribution_version', 'dns', 'effective_group_ids', 'effective_user_id', 'env', 'facter', 'fips', 'hardware', 'interfaces', 'is_chroot', 'iscsi', 'kernel', 'local', 'lsb', 'machine', 'machine_id', 'mounts', 'network', 'ohai', 'os_family', 'pkg_mgr', 'platform', 'processor', 'processor_cores', 'processor_count', 'python', 'python_version', 'real_user_id', 'selinux', 'service_mgr', 'ssh_host_key_dsa_public', 'ssh_host_key_ecdsa_public', 'ssh_host_key_ed25519_public', 'ssh_host_key_rsa_public', 'ssh_host_pub_keys', 'ssh_pub_keys', 'system', 'system_capabilities', 'system_capabilities_enforced', 'user', 'user_dir', 'user_gecos', 'user_gid', 'user_id', 'user_shell', 'user_uid', 'virtual', 'virtualization_role', 'virtualization_type']"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/gather_subset3.yml.md b/test/schemas/negative_test/playbooks/gather_subset3.yml.md
index 7dc1b13..c2ed681 100644
--- a/test/schemas/negative_test/playbooks/gather_subset3.yml.md
+++ b/test/schemas/negative_test/playbooks/gather_subset3.yml.md
@@ -248,6 +248,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/gather_subset3.yml",
@@ -258,6 +259,11 @@ stdout:
"path": "$[0]",
"message": "'gather_subset', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].gather_subset[0]",
+ "message": "1 is not one of ['all', 'min', 'all_ipv4_addresses', 'all_ipv6_addresses', 'apparmor', 'architecture', 'caps', 'chroot,cmdline', 'date_time', 'default_ipv4', 'default_ipv6', 'devices', 'distribution', 'distribution_major_version', 'distribution_release', 'distribution_version', 'dns', 'effective_group_ids', 'effective_user_id', 'env', 'facter', 'fips', 'hardware', 'interfaces', 'is_chroot', 'iscsi', 'kernel', 'local', 'lsb', 'machine', 'machine_id', 'mounts', 'network', 'ohai', 'os_family', 'pkg_mgr', 'platform', 'processor', 'processor_cores', 'processor_count', 'python', 'python_version', 'real_user_id', 'selinux', 'service_mgr', 'ssh_host_key_dsa_public', 'ssh_host_key_ecdsa_public', 'ssh_host_key_ed25519_public', 'ssh_host_key_rsa_public', 'ssh_host_pub_keys', 'ssh_pub_keys', 'system', 'system_capabilities', 'system_capabilities_enforced', 'user', 'user_dir', 'user_gecos', 'user_gid', 'user_id', 'user_shell', 'user_uid', 'virtual', 'virtualization_role', 'virtualization_type']"
+ },
+ "num_sub_errors": 8,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/gather_subset4.yml.md b/test/schemas/negative_test/playbooks/gather_subset4.yml.md
index ada01cb..6372c84 100644
--- a/test/schemas/negative_test/playbooks/gather_subset4.yml.md
+++ b/test/schemas/negative_test/playbooks/gather_subset4.yml.md
@@ -84,6 +84,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/gather_subset4.yml",
@@ -94,6 +95,11 @@ stdout:
"path": "$[0]",
"message": "'gather_subset', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].gather_subset",
+ "message": "1 is not of type 'array'"
+ },
+ "num_sub_errors": 4,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/ignore-unreachable.yml b/test/schemas/negative_test/playbooks/ignore-unreachable.yml
new file mode 100644
index 0000000..0934936
--- /dev/null
+++ b/test/schemas/negative_test/playbooks/ignore-unreachable.yml
@@ -0,0 +1,13 @@
+---
+- name: Test
+ hosts: localhost
+ tasks:
+ - name: Debug
+ ansible.builtin.debug:
+ msg: ignore_unreachable should not be a string
+ ignore_unreachable: "yes"
+
+ - name: Debug
+ ansible.builtin.debug:
+ msg: jinja evaluation should not be a string
+ ignore_unreachable: 123
diff --git a/test/schemas/negative_test/playbooks/ignore-unreachable.yml.md b/test/schemas/negative_test/playbooks/ignore-unreachable.yml.md
new file mode 100644
index 0000000..b12403d
--- /dev/null
+++ b/test/schemas/negative_test/playbooks/ignore-unreachable.yml.md
@@ -0,0 +1,329 @@
+# ajv errors
+
+```json
+[
+ {
+ "instancePath": "/0",
+ "keyword": "required",
+ "message": "must have required property 'ansible.builtin.import_playbook'",
+ "params": {
+ "missingProperty": "ansible.builtin.import_playbook"
+ },
+ "schemaPath": "#/oneOf/0/required"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "required",
+ "message": "must have required property 'import_playbook'",
+ "params": {
+ "missingProperty": "import_playbook"
+ },
+ "schemaPath": "#/oneOf/1/required"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/oneOf"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "additionalProperties",
+ "message": "must NOT have additional properties",
+ "params": {
+ "additionalProperty": "hosts"
+ },
+ "schemaPath": "#/additionalProperties"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "additionalProperties",
+ "message": "must NOT have additional properties",
+ "params": {
+ "additionalProperty": "tasks"
+ },
+ "schemaPath": "#/additionalProperties"
+ },
+ {
+ "instancePath": "/0/tasks/0",
+ "keyword": "required",
+ "message": "must have required property 'block'",
+ "params": {
+ "missingProperty": "block"
+ },
+ "schemaPath": "#/required"
+ },
+ {
+ "instancePath": "/0/tasks/0/ignore_unreachable",
+ "keyword": "type",
+ "message": "must be boolean",
+ "params": {
+ "type": "boolean"
+ },
+ "schemaPath": "#/oneOf/0/type"
+ },
+ {
+ "instancePath": "/0/tasks/0/ignore_unreachable",
+ "keyword": "pattern",
+ "message": "must match pattern \"^\\{[\\{%](.|[\r\n])*[\\}%]\\}$\"",
+ "params": {
+ "pattern": "^\\{[\\{%](.|[\r\n])*[\\}%]\\}$"
+ },
+ "schemaPath": "#/$defs/full-jinja/pattern"
+ },
+ {
+ "instancePath": "/0/tasks/0/ignore_unreachable",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/oneOf"
+ },
+ {
+ "instancePath": "/0/tasks/0/ignore_unreachable",
+ "keyword": "type",
+ "message": "must be boolean",
+ "params": {
+ "type": "boolean"
+ },
+ "schemaPath": "#/oneOf/0/type"
+ },
+ {
+ "instancePath": "/0/tasks/0/ignore_unreachable",
+ "keyword": "pattern",
+ "message": "must match pattern \"^\\{[\\{%](.|[\r\n])*[\\}%]\\}$\"",
+ "params": {
+ "pattern": "^\\{[\\{%](.|[\r\n])*[\\}%]\\}$"
+ },
+ "schemaPath": "#/$defs/full-jinja/pattern"
+ },
+ {
+ "instancePath": "/0/tasks/0/ignore_unreachable",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/oneOf"
+ },
+ {
+ "instancePath": "/0/tasks/0",
+ "keyword": "anyOf",
+ "message": "must match a schema in anyOf",
+ "params": {},
+ "schemaPath": "#/items/anyOf"
+ },
+ {
+ "instancePath": "/0/tasks/1",
+ "keyword": "required",
+ "message": "must have required property 'block'",
+ "params": {
+ "missingProperty": "block"
+ },
+ "schemaPath": "#/required"
+ },
+ {
+ "instancePath": "/0/tasks/1/ignore_unreachable",
+ "keyword": "type",
+ "message": "must be boolean",
+ "params": {
+ "type": "boolean"
+ },
+ "schemaPath": "#/oneOf/0/type"
+ },
+ {
+ "instancePath": "/0/tasks/1/ignore_unreachable",
+ "keyword": "type",
+ "message": "must be string",
+ "params": {
+ "type": "string"
+ },
+ "schemaPath": "#/oneOf/1/type"
+ },
+ {
+ "instancePath": "/0/tasks/1/ignore_unreachable",
+ "keyword": "type",
+ "message": "must be string",
+ "params": {
+ "type": "string"
+ },
+ "schemaPath": "#/$defs/full-jinja/type"
+ },
+ {
+ "instancePath": "/0/tasks/1/ignore_unreachable",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/oneOf"
+ },
+ {
+ "instancePath": "/0/tasks/1/ignore_unreachable",
+ "keyword": "type",
+ "message": "must be boolean",
+ "params": {
+ "type": "boolean"
+ },
+ "schemaPath": "#/oneOf/0/type"
+ },
+ {
+ "instancePath": "/0/tasks/1/ignore_unreachable",
+ "keyword": "type",
+ "message": "must be string",
+ "params": {
+ "type": "string"
+ },
+ "schemaPath": "#/oneOf/1/type"
+ },
+ {
+ "instancePath": "/0/tasks/1/ignore_unreachable",
+ "keyword": "type",
+ "message": "must be string",
+ "params": {
+ "type": "string"
+ },
+ "schemaPath": "#/$defs/full-jinja/type"
+ },
+ {
+ "instancePath": "/0/tasks/1/ignore_unreachable",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/oneOf"
+ },
+ {
+ "instancePath": "/0/tasks/1",
+ "keyword": "anyOf",
+ "message": "must match a schema in anyOf",
+ "params": {},
+ "schemaPath": "#/items/anyOf"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/items/oneOf"
+ }
+]
+```
+
+# check-jsonschema
+
+stdout:
+
+```json
+{
+ "status": "fail",
+ "successes": [],
+ "errors": [
+ {
+ "filename": "negative_test/playbooks/ignore-unreachable.yml",
+ "path": "$[0]",
+ "message": "{'name': 'Test', 'hosts': 'localhost', 'tasks': [{'name': 'Debug', 'ansible.builtin.debug': {'msg': 'ignore_unreachable should not be a string'}, 'ignore_unreachable': 'yes'}, {'name': 'Debug', 'ansible.builtin.debug': {'msg': 'jinja evaluation should not be a string'}, 'ignore_unreachable': 123}]} is not valid under any of the given schemas",
+ "has_sub_errors": true,
+ "best_match": {
+ "path": "$[0]",
+ "message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
+ },
+ "best_deep_match": {
+ "path": "$[0].tasks[0].ignore_unreachable",
+ "message": "'yes' is not of type 'boolean'"
+ },
+ "num_sub_errors": 19,
+ "sub_errors": [
+ {
+ "path": "$[0]",
+ "message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
+ },
+ {
+ "path": "$[0]",
+ "message": "{'name': 'Test', 'hosts': 'localhost', 'tasks': [{'name': 'Debug', 'ansible.builtin.debug': {'msg': 'ignore_unreachable should not be a string'}, 'ignore_unreachable': 'yes'}, {'name': 'Debug', 'ansible.builtin.debug': {'msg': 'jinja evaluation should not be a string'}, 'ignore_unreachable': 123}]} is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0]",
+ "message": "'ansible.builtin.import_playbook' is a required property"
+ },
+ {
+ "path": "$[0]",
+ "message": "'import_playbook' is a required property"
+ },
+ {
+ "path": "$[0].tasks[0]",
+ "message": "{'name': 'Debug', 'ansible.builtin.debug': {'msg': 'ignore_unreachable should not be a string'}, 'ignore_unreachable': 'yes'} is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0].tasks[0].ignore_unreachable",
+ "message": "'yes' is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0].tasks[0].ignore_unreachable",
+ "message": "'yes' is not of type 'boolean'"
+ },
+ {
+ "path": "$[0].tasks[0].ignore_unreachable",
+ "message": "'yes' does not match '^\\\\{[\\\\{%](.|[\\r\\n])*[\\\\}%]\\\\}$'"
+ },
+ {
+ "path": "$[0].tasks[0]",
+ "message": "'block' is a required property"
+ },
+ {
+ "path": "$[0].tasks[0].ignore_unreachable",
+ "message": "'yes' is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0].tasks[0].ignore_unreachable",
+ "message": "'yes' is not of type 'boolean'"
+ },
+ {
+ "path": "$[0].tasks[0].ignore_unreachable",
+ "message": "'yes' does not match '^\\\\{[\\\\{%](.|[\\r\\n])*[\\\\}%]\\\\}$'"
+ },
+ {
+ "path": "$[0].tasks[1]",
+ "message": "{'name': 'Debug', 'ansible.builtin.debug': {'msg': 'jinja evaluation should not be a string'}, 'ignore_unreachable': 123} is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0].tasks[1].ignore_unreachable",
+ "message": "123 is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0].tasks[1].ignore_unreachable",
+ "message": "123 is not of type 'boolean'"
+ },
+ {
+ "path": "$[0].tasks[1].ignore_unreachable",
+ "message": "123 is not of type 'string'"
+ },
+ {
+ "path": "$[0].tasks[1]",
+ "message": "'block' is a required property"
+ },
+ {
+ "path": "$[0].tasks[1].ignore_unreachable",
+ "message": "123 is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0].tasks[1].ignore_unreachable",
+ "message": "123 is not of type 'boolean'"
+ },
+ {
+ "path": "$[0].tasks[1].ignore_unreachable",
+ "message": "123 is not of type 'string'"
+ }
+ ]
+ }
+ ],
+ "parse_errors": []
+}
+```
diff --git a/test/schemas/negative_test/playbooks/ignore_errors.yml.md b/test/schemas/negative_test/playbooks/ignore_errors.yml.md
index 61c3116..c76c098 100644
--- a/test/schemas/negative_test/playbooks/ignore_errors.yml.md
+++ b/test/schemas/negative_test/playbooks/ignore_errors.yml.md
@@ -136,6 +136,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/ignore_errors.yml",
@@ -146,6 +147,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].ignore_errors",
+ "message": "'should_ignore_errors' is not of type 'boolean'"
+ },
+ "num_sub_errors": 11,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/import_playbook.yml.md b/test/schemas/negative_test/playbooks/import_playbook.yml.md
index def3dce..a04a1b8 100644
--- a/test/schemas/negative_test/playbooks/import_playbook.yml.md
+++ b/test/schemas/negative_test/playbooks/import_playbook.yml.md
@@ -55,6 +55,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/import_playbook.yml",
@@ -65,6 +66,11 @@ stdout:
"path": "$[0]",
"message": "{'ansible.builtin.import_playbook': {}} should not be valid under {'required': ['ansible.builtin.import_playbook']}"
},
+ "best_deep_match": {
+ "path": "$[0].ansible.builtin.import_playbook",
+ "message": "{} is not of type 'string'"
+ },
+ "num_sub_errors": 3,
"sub_errors": [
{
"path": "$[0].ansible.builtin.import_playbook",
diff --git a/test/schemas/negative_test/playbooks/import_playbook_exclusive.yml.md b/test/schemas/negative_test/playbooks/import_playbook_exclusive.yml.md
index 184a434..143165f 100644
--- a/test/schemas/negative_test/playbooks/import_playbook_exclusive.yml.md
+++ b/test/schemas/negative_test/playbooks/import_playbook_exclusive.yml.md
@@ -85,6 +85,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/import_playbook_exclusive.yml",
@@ -95,6 +96,11 @@ stdout:
"path": "$[0]",
"message": "{'ansible.builtin.import_playbook': 'foo.yml', 'import_playbook': 'other.yml'} should not be valid under {'required': ['ansible.builtin.import_playbook']}"
},
+ "best_deep_match": {
+ "path": "$[0]",
+ "message": "{'ansible.builtin.import_playbook': 'foo.yml', 'import_playbook': 'other.yml'} should not be valid under {'required': ['import_playbook']}"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/include.yml b/test/schemas/negative_test/playbooks/include.yml
new file mode 100644
index 0000000..5504e13
--- /dev/null
+++ b/test/schemas/negative_test/playbooks/include.yml
@@ -0,0 +1,3 @@
+- hosts: localhost
+ tasks:
+ - include: foo.yml # <-- removed in Ansible 2.16
diff --git a/test/schemas/negative_test/playbooks/include.yml.md b/test/schemas/negative_test/playbooks/include.yml.md
new file mode 100644
index 0000000..c577d84
--- /dev/null
+++ b/test/schemas/negative_test/playbooks/include.yml.md
@@ -0,0 +1,142 @@
+# ajv errors
+
+```json
+[
+ {
+ "instancePath": "/0",
+ "keyword": "required",
+ "message": "must have required property 'ansible.builtin.import_playbook'",
+ "params": {
+ "missingProperty": "ansible.builtin.import_playbook"
+ },
+ "schemaPath": "#/oneOf/0/required"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "required",
+ "message": "must have required property 'import_playbook'",
+ "params": {
+ "missingProperty": "import_playbook"
+ },
+ "schemaPath": "#/oneOf/1/required"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/oneOf"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "additionalProperties",
+ "message": "must NOT have additional properties",
+ "params": {
+ "additionalProperty": "hosts"
+ },
+ "schemaPath": "#/additionalProperties"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "additionalProperties",
+ "message": "must NOT have additional properties",
+ "params": {
+ "additionalProperty": "tasks"
+ },
+ "schemaPath": "#/additionalProperties"
+ },
+ {
+ "instancePath": "/0/tasks/0",
+ "keyword": "required",
+ "message": "must have required property 'block'",
+ "params": {
+ "missingProperty": "block"
+ },
+ "schemaPath": "#/required"
+ },
+ {
+ "instancePath": "/0/tasks/0/include",
+ "keyword": "not",
+ "message": "must NOT be valid",
+ "params": {},
+ "schemaPath": "#/$defs/removed-include-module/not"
+ },
+ {
+ "instancePath": "/0/tasks/0",
+ "keyword": "anyOf",
+ "message": "must match a schema in anyOf",
+ "params": {},
+ "schemaPath": "#/items/anyOf"
+ },
+ {
+ "instancePath": "/0",
+ "keyword": "oneOf",
+ "message": "must match exactly one schema in oneOf",
+ "params": {
+ "passingSchemas": null
+ },
+ "schemaPath": "#/items/oneOf"
+ }
+]
+```
+
+# check-jsonschema
+
+stdout:
+
+```json
+{
+ "status": "fail",
+ "successes": [],
+ "errors": [
+ {
+ "filename": "negative_test/playbooks/include.yml",
+ "path": "$[0]",
+ "message": "{'hosts': 'localhost', 'tasks': [{'include': 'foo.yml'}]} is not valid under any of the given schemas",
+ "has_sub_errors": true,
+ "best_match": {
+ "path": "$[0]",
+ "message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
+ },
+ "best_deep_match": {
+ "path": "$[0].tasks[0].include",
+ "message": "'foo.yml' should not be valid under {}"
+ },
+ "num_sub_errors": 6,
+ "sub_errors": [
+ {
+ "path": "$[0]",
+ "message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
+ },
+ {
+ "path": "$[0]",
+ "message": "{'hosts': 'localhost', 'tasks': [{'include': 'foo.yml'}]} is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0]",
+ "message": "'ansible.builtin.import_playbook' is a required property"
+ },
+ {
+ "path": "$[0]",
+ "message": "'import_playbook' is a required property"
+ },
+ {
+ "path": "$[0].tasks[0]",
+ "message": "{'include': 'foo.yml'} is not valid under any of the given schemas"
+ },
+ {
+ "path": "$[0].tasks[0]",
+ "message": "'block' is a required property"
+ },
+ {
+ "path": "$[0].tasks[0].include",
+ "message": "'foo.yml' should not be valid under {}"
+ }
+ ]
+ }
+ ],
+ "parse_errors": []
+}
+```
diff --git a/test/schemas/negative_test/playbooks/invalid-failed-when.yml.md b/test/schemas/negative_test/playbooks/invalid-failed-when.yml.md
index 3a41059..e2d1a0d 100644
--- a/test/schemas/negative_test/playbooks/invalid-failed-when.yml.md
+++ b/test/schemas/negative_test/playbooks/invalid-failed-when.yml.md
@@ -170,6 +170,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/invalid-failed-when.yml",
@@ -180,6 +181,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].failed_when",
+ "message": "123 is not of type 'boolean'"
+ },
+ "num_sub_errors": 15,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/invalid-serial.yml.md b/test/schemas/negative_test/playbooks/invalid-serial.yml.md
index 5c48b21..80785f0 100644
--- a/test/schemas/negative_test/playbooks/invalid-serial.yml.md
+++ b/test/schemas/negative_test/playbooks/invalid-serial.yml.md
@@ -118,6 +118,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/invalid-serial.yml",
@@ -128,6 +129,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'serial' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].serial",
+ "message": "'10%BAD' is not of type 'integer'"
+ },
+ "num_sub_errors": 9,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/invalid.yml.md b/test/schemas/negative_test/playbooks/invalid.yml.md
index c3435dd..6a48a92 100644
--- a/test/schemas/negative_test/playbooks/invalid.yml.md
+++ b/test/schemas/negative_test/playbooks/invalid.yml.md
@@ -46,6 +46,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/invalid.yml",
@@ -56,6 +57,11 @@ stdout:
"path": "$[0]",
"message": "{'name': 'foo', 'hosts': 'localhost', 'import_playbook': 'included.yml'} should not be valid under {'required': ['import_playbook']}"
},
+ "best_deep_match": {
+ "path": "$[0]",
+ "message": "'hosts' does not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
+ },
+ "num_sub_errors": 2,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/invalid_become.yml.md b/test/schemas/negative_test/playbooks/invalid_become.yml.md
index 37d730d..e4fd6d5 100644
--- a/test/schemas/negative_test/playbooks/invalid_become.yml.md
+++ b/test/schemas/negative_test/playbooks/invalid_become.yml.md
@@ -93,6 +93,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/invalid_become.yml",
@@ -103,6 +104,11 @@ stdout:
"path": "$[0]",
"message": "'become', 'hosts' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].become",
+ "message": "'yes' is not of type 'boolean'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/local_action.yml.md b/test/schemas/negative_test/playbooks/local_action.yml.md
index 17f6244..d41de95 100644
--- a/test/schemas/negative_test/playbooks/local_action.yml.md
+++ b/test/schemas/negative_test/playbooks/local_action.yml.md
@@ -94,6 +94,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/local_action.yml",
@@ -104,6 +105,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].local_action",
+ "message": "[] is not of type 'string', 'object'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/loop.yml.md b/test/schemas/negative_test/playbooks/loop.yml.md
index 88df838..c7b3e45 100644
--- a/test/schemas/negative_test/playbooks/loop.yml.md
+++ b/test/schemas/negative_test/playbooks/loop.yml.md
@@ -94,6 +94,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/loop.yml",
@@ -104,6 +105,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].loop",
+ "message": "123 is not of type 'string', 'array'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/loop2.yml.md b/test/schemas/negative_test/playbooks/loop2.yml.md
index df60a41..cf77f85 100644
--- a/test/schemas/negative_test/playbooks/loop2.yml.md
+++ b/test/schemas/negative_test/playbooks/loop2.yml.md
@@ -94,6 +94,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/loop2.yml",
@@ -104,6 +105,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].loop",
+ "message": "{} is not of type 'string', 'array'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/no_log_partial_template.yml.md b/test/schemas/negative_test/playbooks/no_log_partial_template.yml.md
index ee73686..c7fd4fd 100644
--- a/test/schemas/negative_test/playbooks/no_log_partial_template.yml.md
+++ b/test/schemas/negative_test/playbooks/no_log_partial_template.yml.md
@@ -136,6 +136,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/no_log_partial_template.yml",
@@ -146,6 +147,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].no_log",
+ "message": "'foo-{{ some_var }}' is not of type 'boolean'"
+ },
+ "num_sub_errors": 11,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/no_log_string.yml.md b/test/schemas/negative_test/playbooks/no_log_string.yml.md
index c8213c0..98b4bc2 100644
--- a/test/schemas/negative_test/playbooks/no_log_string.yml.md
+++ b/test/schemas/negative_test/playbooks/no_log_string.yml.md
@@ -136,6 +136,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/no_log_string.yml",
@@ -146,6 +147,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].no_log",
+ "message": "'some_var' is not of type 'boolean'"
+ },
+ "num_sub_errors": 11,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/roles.yml.md b/test/schemas/negative_test/playbooks/roles.yml.md
index 9b4e25a..72d7b85 100644
--- a/test/schemas/negative_test/playbooks/roles.yml.md
+++ b/test/schemas/negative_test/playbooks/roles.yml.md
@@ -75,6 +75,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/roles.yml",
@@ -85,6 +86,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'roles' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].roles",
+ "message": "'xxx' is not of type 'array'"
+ },
+ "num_sub_errors": 4,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/run_once_list.yml.md b/test/schemas/negative_test/playbooks/run_once_list.yml.md
index 84b7dc1..63424ff 100644
--- a/test/schemas/negative_test/playbooks/run_once_list.yml.md
+++ b/test/schemas/negative_test/playbooks/run_once_list.yml.md
@@ -154,6 +154,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/run_once_list.yml",
@@ -164,6 +165,11 @@ stdout:
"path": "$[0]",
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].run_once",
+ "message": "['{{ true }}', 'xxx'] is not of type 'boolean'"
+ },
+ "num_sub_errors": 11,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tags-mapping.yml.md b/test/schemas/negative_test/playbooks/tags-mapping.yml.md
index aada0c6..10cdb9b 100644
--- a/test/schemas/negative_test/playbooks/tags-mapping.yml.md
+++ b/test/schemas/negative_test/playbooks/tags-mapping.yml.md
@@ -107,6 +107,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tags-mapping.yml",
@@ -117,6 +118,11 @@ stdout:
"path": "$[0]",
"message": "'hosts' does not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tags",
+ "message": "{} is not of type 'string'"
+ },
+ "num_sub_errors": 9,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tags-number.yml.md b/test/schemas/negative_test/playbooks/tags-number.yml.md
index 3d32737..48a264a 100644
--- a/test/schemas/negative_test/playbooks/tags-number.yml.md
+++ b/test/schemas/negative_test/playbooks/tags-number.yml.md
@@ -107,6 +107,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tags-number.yml",
@@ -117,6 +118,11 @@ stdout:
"path": "$[0]",
"message": "'hosts' does not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tags",
+ "message": "123 is not of type 'string'"
+ },
+ "num_sub_errors": 9,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tasks.yml.md b/test/schemas/negative_test/playbooks/tasks.yml.md
index 309912b..08d7fe4 100644
--- a/test/schemas/negative_test/playbooks/tasks.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks.yml.md
@@ -141,6 +141,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks.yml",
@@ -151,6 +152,11 @@ stdout:
"path": "$[0]",
"message": "'handlers', 'hosts', 'post_tasks', 'pre_tasks', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].handlers",
+ "message": "1.0 is not of type 'array', 'null'"
+ },
+ "num_sub_errors": 7,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tasks/args_integer.yml.md b/test/schemas/negative_test/playbooks/tasks/args_integer.yml.md
index 8820251..25000f8 100644
--- a/test/schemas/negative_test/playbooks/tasks/args_integer.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/args_integer.yml.md
@@ -64,6 +64,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/args_integer.yml",
@@ -74,6 +75,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].args",
+ "message": "123 is not of type 'object'"
+ },
+ "num_sub_errors": 3,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tasks/args_string.yml.md b/test/schemas/negative_test/playbooks/tasks/args_string.yml.md
index 6359a14..b1bf502 100644
--- a/test/schemas/negative_test/playbooks/tasks/args_string.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/args_string.yml.md
@@ -55,6 +55,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/args_string.yml",
@@ -65,6 +66,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].args",
+ "message": "'{{ }}123' is not of type 'object'"
+ },
+ "num_sub_errors": 3,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tasks/become_method_invalid.yml.md b/test/schemas/negative_test/playbooks/tasks/become_method_invalid.yml.md
index fc1e692..b94527a 100644
--- a/test/schemas/negative_test/playbooks/tasks/become_method_invalid.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/become_method_invalid.yml.md
@@ -140,6 +140,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/become_method_invalid.yml",
@@ -150,6 +151,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].become_method",
+ "message": "True is not one of ['ansible.builtin.sudo', 'ansible.builtin.su', 'community.general.pbrun', 'community.general.pfexec', 'ansible.builtin.runas', 'community.general.dzdo', 'community.general.ksu', 'community.general.doas', 'community.general.machinectl', 'community.general.pmrun', 'community.general.sesu', 'community.general.sudosu']"
+ },
+ "num_sub_errors": 10,
"sub_errors": [
{
"path": "$[0].become_method",
diff --git a/test/schemas/negative_test/playbooks/tasks/ignore_errors.yml.md b/test/schemas/negative_test/playbooks/tasks/ignore_errors.yml.md
index 559a200..abd8968 100644
--- a/test/schemas/negative_test/playbooks/tasks/ignore_errors.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/ignore_errors.yml.md
@@ -82,6 +82,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/ignore_errors.yml",
@@ -92,6 +93,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].ignore_errors",
+ "message": "'should_ignore_errors' is not of type 'boolean'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0].ignore_errors",
diff --git a/test/schemas/negative_test/playbooks/tasks/invalid_block.yml.md b/test/schemas/negative_test/playbooks/tasks/invalid_block.yml.md
index bf4b30e..f952161 100644
--- a/test/schemas/negative_test/playbooks/tasks/invalid_block.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/invalid_block.yml.md
@@ -35,6 +35,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/invalid_block.yml",
@@ -45,6 +46,11 @@ stdout:
"path": "$[0]",
"message": "{'block': {}} should not be valid under {'required': ['block']}"
},
+ "best_deep_match": {
+ "path": "$[0].block",
+ "message": "{} is not of type 'array'"
+ },
+ "num_sub_errors": 1,
"sub_errors": [
{
"path": "$[0].block",
diff --git a/test/schemas/negative_test/playbooks/tasks/local_action.yml.md b/test/schemas/negative_test/playbooks/tasks/local_action.yml.md
index cf67e7b..0b1151b 100644
--- a/test/schemas/negative_test/playbooks/tasks/local_action.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/local_action.yml.md
@@ -40,6 +40,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/local_action.yml",
@@ -50,6 +51,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].local_action",
+ "message": "[] is not of type 'string', 'object'"
+ },
+ "num_sub_errors": 1,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tasks/loop.yml.md b/test/schemas/negative_test/playbooks/tasks/loop.yml.md
index de8277f..45a1908 100644
--- a/test/schemas/negative_test/playbooks/tasks/loop.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/loop.yml.md
@@ -40,6 +40,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/loop.yml",
@@ -50,6 +51,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].loop",
+ "message": "{} is not of type 'string', 'array'"
+ },
+ "num_sub_errors": 1,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tasks/loop2.yml.md b/test/schemas/negative_test/playbooks/tasks/loop2.yml.md
index c36d7c9..e29af19 100644
--- a/test/schemas/negative_test/playbooks/tasks/loop2.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/loop2.yml.md
@@ -40,6 +40,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/loop2.yml",
@@ -50,6 +51,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].loop",
+ "message": "123 is not of type 'string', 'array'"
+ },
+ "num_sub_errors": 1,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tasks/no_log_number.yml.md b/test/schemas/negative_test/playbooks/tasks/no_log_number.yml.md
index 4b9516c..bc85fd7 100644
--- a/test/schemas/negative_test/playbooks/tasks/no_log_number.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/no_log_number.yml.md
@@ -100,6 +100,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/no_log_number.yml",
@@ -110,6 +111,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].no_log",
+ "message": "123 is not of type 'boolean'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0].no_log",
diff --git a/test/schemas/negative_test/playbooks/tasks/no_log_string.yml.md b/test/schemas/negative_test/playbooks/tasks/no_log_string.yml.md
index 6742175..ec88c66 100644
--- a/test/schemas/negative_test/playbooks/tasks/no_log_string.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/no_log_string.yml.md
@@ -82,6 +82,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/no_log_string.yml",
@@ -92,6 +93,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].no_log",
+ "message": "'some_var' is not of type 'boolean'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0].no_log",
diff --git a/test/schemas/negative_test/playbooks/tasks/tags-mapping.yml.md b/test/schemas/negative_test/playbooks/tasks/tags-mapping.yml.md
index d860605..998d783 100644
--- a/test/schemas/negative_test/playbooks/tasks/tags-mapping.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/tags-mapping.yml.md
@@ -78,6 +78,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/tags-mapping.yml",
@@ -88,6 +89,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].tags",
+ "message": "{} is not of type 'string'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0].tags",
diff --git a/test/schemas/negative_test/playbooks/tasks/tags-string.yml.md b/test/schemas/negative_test/playbooks/tasks/tags-string.yml.md
index 0bb7ed0..cdf421d 100644
--- a/test/schemas/negative_test/playbooks/tasks/tags-string.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/tags-string.yml.md
@@ -78,6 +78,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/tags-string.yml",
@@ -88,6 +89,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].tags",
+ "message": "123 is not of type 'string'"
+ },
+ "num_sub_errors": 6,
"sub_errors": [
{
"path": "$[0].tags",
diff --git a/test/schemas/negative_test/playbooks/tasks/when_integer.yml.md b/test/schemas/negative_test/playbooks/tasks/when_integer.yml.md
index bc59cc4..8acb890 100644
--- a/test/schemas/negative_test/playbooks/tasks/when_integer.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/when_integer.yml.md
@@ -100,6 +100,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/when_integer.yml",
@@ -110,6 +111,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].when",
+ "message": "123 is not of type 'boolean'"
+ },
+ "num_sub_errors": 8,
"sub_errors": [
{
"path": "$[0].when",
diff --git a/test/schemas/negative_test/playbooks/tasks/when_object.yml.md b/test/schemas/negative_test/playbooks/tasks/when_object.yml.md
index 6c28d0c..4ea653b 100644
--- a/test/schemas/negative_test/playbooks/tasks/when_object.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/when_object.yml.md
@@ -100,6 +100,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/when_object.yml",
@@ -110,6 +111,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].when",
+ "message": "{} is not of type 'boolean'"
+ },
+ "num_sub_errors": 8,
"sub_errors": [
{
"path": "$[0].when",
diff --git a/test/schemas/negative_test/playbooks/tasks/with_items_boolean.yml.md b/test/schemas/negative_test/playbooks/tasks/with_items_boolean.yml.md
index ffc8ef8..92340d2 100644
--- a/test/schemas/negative_test/playbooks/tasks/with_items_boolean.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/with_items_boolean.yml.md
@@ -53,6 +53,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/with_items_boolean.yml",
@@ -63,6 +64,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].with_items",
+ "message": "True is not of type 'string'"
+ },
+ "num_sub_errors": 3,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/tasks/with_items_untemplated_string.yml.md b/test/schemas/negative_test/playbooks/tasks/with_items_untemplated_string.yml.md
index 158b0ee..8ecd7bf 100644
--- a/test/schemas/negative_test/playbooks/tasks/with_items_untemplated_string.yml.md
+++ b/test/schemas/negative_test/playbooks/tasks/with_items_untemplated_string.yml.md
@@ -53,6 +53,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/tasks/with_items_untemplated_string.yml",
@@ -63,6 +64,11 @@ stdout:
"path": "$[0]",
"message": "'block' is a required property"
},
+ "best_deep_match": {
+ "path": "$[0].with_items",
+ "message": "'foobar' does not match '^\\\\{[\\\\{%](.|[\\r\\n])*[\\\\}%]\\\\}$'"
+ },
+ "num_sub_errors": 3,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/var_files_list_number.yml.md b/test/schemas/negative_test/playbooks/var_files_list_number.yml.md
index e915593..c47cc1b 100644
--- a/test/schemas/negative_test/playbooks/var_files_list_number.yml.md
+++ b/test/schemas/negative_test/playbooks/var_files_list_number.yml.md
@@ -93,6 +93,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/var_files_list_number.yml",
@@ -103,6 +104,11 @@ stdout:
"path": "$[0]",
"message": "'hosts' does not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].vars_files[0]",
+ "message": "0 is not of type 'string'"
+ },
+ "num_sub_errors": 7,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/var_files_list_of_list_number.yml.md b/test/schemas/negative_test/playbooks/var_files_list_of_list_number.yml.md
index 3494498..2f9b9cb 100644
--- a/test/schemas/negative_test/playbooks/var_files_list_of_list_number.yml.md
+++ b/test/schemas/negative_test/playbooks/var_files_list_of_list_number.yml.md
@@ -102,6 +102,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/var_files_list_of_list_number.yml",
@@ -112,6 +113,11 @@ stdout:
"path": "$[0]",
"message": "'hosts' does not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].vars_files[0][0]",
+ "message": "0 is not of type 'string'"
+ },
+ "num_sub_errors": 8,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/var_files_number.yml.md b/test/schemas/negative_test/playbooks/var_files_number.yml.md
index fa97e7e..f121b09 100644
--- a/test/schemas/negative_test/playbooks/var_files_number.yml.md
+++ b/test/schemas/negative_test/playbooks/var_files_number.yml.md
@@ -79,6 +79,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/var_files_number.yml",
@@ -89,6 +90,11 @@ stdout:
"path": "$[0]",
"message": "'hosts' does not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].vars_files",
+ "message": "0 is not of type 'object'"
+ },
+ "num_sub_errors": 5,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/vars/asterisk.yml.md b/test/schemas/negative_test/playbooks/vars/asterisk.yml.md
index 1ea9a98..9204de1 100644
--- a/test/schemas/negative_test/playbooks/vars/asterisk.yml.md
+++ b/test/schemas/negative_test/playbooks/vars/asterisk.yml.md
@@ -46,6 +46,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/vars/asterisk.yml",
@@ -56,6 +57,11 @@ stdout:
"path": "$",
"message": "{'*foo': '...'} is not of type 'string'"
},
+ "best_deep_match": {
+ "path": "$",
+ "message": "'*foo' does not match any of the regexes: '^(?!(False|None|True|and|any_errors_fatal|as|assert|async|await|become|become_exe|become_flags|become_method|become_user|break|check_mode|class|collections|connection|continue|debugger|def|del|diff|elif|else|environment|except|fact_path|finally|for|force_handlers|from|gather_facts|gather_subset|gather_timeout|global|handlers|hosts|if|ignore_errors|ignore_unreachable|import|in|is|lambda|max_fail_percentage|module_defaults|name|no_log|nonlocal|not|or|order|pass|port|post_tasks|pre_tasks|raise|remote_user|return|roles|run_once|serial|strategy|tags|tasks|throttle|timeout|try|vars|vars_files|vars_prompt|while|with|yield)$)[a-zA-Z_][\\\\w]*$'"
+ },
+ "num_sub_errors": 2,
"sub_errors": [
{
"path": "$",
diff --git a/test/schemas/negative_test/playbooks/vars/dash-in-var-name.yml.md b/test/schemas/negative_test/playbooks/vars/dash-in-var-name.yml.md
index b862e69..6e0a83b 100644
--- a/test/schemas/negative_test/playbooks/vars/dash-in-var-name.yml.md
+++ b/test/schemas/negative_test/playbooks/vars/dash-in-var-name.yml.md
@@ -46,6 +46,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/vars/dash-in-var-name.yml",
@@ -56,6 +57,11 @@ stdout:
"path": "$",
"message": "{'foo-bar': '...'} is not of type 'string'"
},
+ "best_deep_match": {
+ "path": "$",
+ "message": "'foo-bar' does not match any of the regexes: '^(?!(False|None|True|and|any_errors_fatal|as|assert|async|await|become|become_exe|become_flags|become_method|become_user|break|check_mode|class|collections|connection|continue|debugger|def|del|diff|elif|else|environment|except|fact_path|finally|for|force_handlers|from|gather_facts|gather_subset|gather_timeout|global|handlers|hosts|if|ignore_errors|ignore_unreachable|import|in|is|lambda|max_fail_percentage|module_defaults|name|no_log|nonlocal|not|or|order|pass|port|post_tasks|pre_tasks|raise|remote_user|return|roles|run_once|serial|strategy|tags|tasks|throttle|timeout|try|vars|vars_files|vars_prompt|while|with|yield)$)[a-zA-Z_][\\\\w]*$'"
+ },
+ "num_sub_errors": 2,
"sub_errors": [
{
"path": "$",
diff --git a/test/schemas/negative_test/playbooks/vars/list.yml.md b/test/schemas/negative_test/playbooks/vars/list.yml.md
index e2c9bf5..82f599a 100644
--- a/test/schemas/negative_test/playbooks/vars/list.yml.md
+++ b/test/schemas/negative_test/playbooks/vars/list.yml.md
@@ -46,6 +46,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/vars/list.yml",
@@ -56,6 +57,11 @@ stdout:
"path": "$",
"message": "['foo', 'bar'] is not of type 'object'"
},
+ "best_deep_match": {
+ "path": "$",
+ "message": "['foo', 'bar'] is not of type 'object'"
+ },
+ "num_sub_errors": 2,
"sub_errors": [
{
"path": "$",
diff --git a/test/schemas/negative_test/playbooks/vars/numeric-var-name.yml.md b/test/schemas/negative_test/playbooks/vars/numeric-var-name.yml.md
index 7ddcff6..9f15015 100644
--- a/test/schemas/negative_test/playbooks/vars/numeric-var-name.yml.md
+++ b/test/schemas/negative_test/playbooks/vars/numeric-var-name.yml.md
@@ -46,6 +46,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/vars/numeric-var-name.yml",
@@ -56,6 +57,11 @@ stdout:
"path": "$",
"message": "{'12': '...'} is not of type 'string'"
},
+ "best_deep_match": {
+ "path": "$",
+ "message": "'12' does not match any of the regexes: '^(?!(False|None|True|and|any_errors_fatal|as|assert|async|await|become|become_exe|become_flags|become_method|become_user|break|check_mode|class|collections|connection|continue|debugger|def|del|diff|elif|else|environment|except|fact_path|finally|for|force_handlers|from|gather_facts|gather_subset|gather_timeout|global|handlers|hosts|if|ignore_errors|ignore_unreachable|import|in|is|lambda|max_fail_percentage|module_defaults|name|no_log|nonlocal|not|or|order|pass|port|post_tasks|pre_tasks|raise|remote_user|return|roles|run_once|serial|strategy|tags|tasks|throttle|timeout|try|vars|vars_files|vars_prompt|while|with|yield)$)[a-zA-Z_][\\\\w]*$'"
+ },
+ "num_sub_errors": 2,
"sub_errors": [
{
"path": "$",
diff --git a/test/schemas/negative_test/playbooks/vars/play-keyword.yml.md b/test/schemas/negative_test/playbooks/vars/play-keyword.yml.md
index 6b88b2a..d463c1c 100644
--- a/test/schemas/negative_test/playbooks/vars/play-keyword.yml.md
+++ b/test/schemas/negative_test/playbooks/vars/play-keyword.yml.md
@@ -46,6 +46,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/vars/play-keyword.yml",
@@ -56,6 +57,11 @@ stdout:
"path": "$",
"message": "{'environment': '...'} is not of type 'string'"
},
+ "best_deep_match": {
+ "path": "$",
+ "message": "'environment' does not match any of the regexes: '^(?!(False|None|True|and|any_errors_fatal|as|assert|async|await|become|become_exe|become_flags|become_method|become_user|break|check_mode|class|collections|connection|continue|debugger|def|del|diff|elif|else|environment|except|fact_path|finally|for|force_handlers|from|gather_facts|gather_subset|gather_timeout|global|handlers|hosts|if|ignore_errors|ignore_unreachable|import|in|is|lambda|max_fail_percentage|module_defaults|name|no_log|nonlocal|not|or|order|pass|port|post_tasks|pre_tasks|raise|remote_user|return|roles|run_once|serial|strategy|tags|tasks|throttle|timeout|try|vars|vars_files|vars_prompt|while|with|yield)$)[a-zA-Z_][\\\\w]*$'"
+ },
+ "num_sub_errors": 2,
"sub_errors": [
{
"path": "$",
diff --git a/test/schemas/negative_test/playbooks/vars/python-keyword.yml.md b/test/schemas/negative_test/playbooks/vars/python-keyword.yml.md
index ca42f74..667364c 100644
--- a/test/schemas/negative_test/playbooks/vars/python-keyword.yml.md
+++ b/test/schemas/negative_test/playbooks/vars/python-keyword.yml.md
@@ -55,6 +55,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/vars/python-keyword.yml",
@@ -65,6 +66,11 @@ stdout:
"path": "$",
"message": "{'async': '...', 'lambda': '...'} is not of type 'string'"
},
+ "best_deep_match": {
+ "path": "$",
+ "message": "'async', 'lambda' do not match any of the regexes: '^(?!(False|None|True|and|any_errors_fatal|as|assert|async|await|become|become_exe|become_flags|become_method|become_user|break|check_mode|class|collections|connection|continue|debugger|def|del|diff|elif|else|environment|except|fact_path|finally|for|force_handlers|from|gather_facts|gather_subset|gather_timeout|global|handlers|hosts|if|ignore_errors|ignore_unreachable|import|in|is|lambda|max_fail_percentage|module_defaults|name|no_log|nonlocal|not|or|order|pass|port|post_tasks|pre_tasks|raise|remote_user|return|roles|run_once|serial|strategy|tags|tasks|throttle|timeout|try|vars|vars_files|vars_prompt|while|with|yield)$)[a-zA-Z_][\\\\w]*$'"
+ },
+ "num_sub_errors": 2,
"sub_errors": [
{
"path": "$",
diff --git a/test/schemas/negative_test/playbooks/vars/varname-numeric-prefix.yml.md b/test/schemas/negative_test/playbooks/vars/varname-numeric-prefix.yml.md
index 8b73b0a..620a03c 100644
--- a/test/schemas/negative_test/playbooks/vars/varname-numeric-prefix.yml.md
+++ b/test/schemas/negative_test/playbooks/vars/varname-numeric-prefix.yml.md
@@ -46,6 +46,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/vars/varname-numeric-prefix.yml",
@@ -56,6 +57,11 @@ stdout:
"path": "$",
"message": "{'5foo': '...'} is not of type 'string'"
},
+ "best_deep_match": {
+ "path": "$",
+ "message": "'5foo' does not match any of the regexes: '^(?!(False|None|True|and|any_errors_fatal|as|assert|async|await|become|become_exe|become_flags|become_method|become_user|break|check_mode|class|collections|connection|continue|debugger|def|del|diff|elif|else|environment|except|fact_path|finally|for|force_handlers|from|gather_facts|gather_subset|gather_timeout|global|handlers|hosts|if|ignore_errors|ignore_unreachable|import|in|is|lambda|max_fail_percentage|module_defaults|name|no_log|nonlocal|not|or|order|pass|port|post_tasks|pre_tasks|raise|remote_user|return|roles|run_once|serial|strategy|tags|tasks|throttle|timeout|try|vars|vars_files|vars_prompt|while|with|yield)$)[a-zA-Z_][\\\\w]*$'"
+ },
+ "num_sub_errors": 2,
"sub_errors": [
{
"path": "$",
diff --git a/test/schemas/negative_test/playbooks/vas_prompt.yml.md b/test/schemas/negative_test/playbooks/vas_prompt.yml.md
index d2d809d..ca1863f 100644
--- a/test/schemas/negative_test/playbooks/vas_prompt.yml.md
+++ b/test/schemas/negative_test/playbooks/vas_prompt.yml.md
@@ -75,6 +75,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/vas_prompt.yml",
@@ -85,6 +86,11 @@ stdout:
"path": "$[0]",
"message": "'hosts' does not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].vars_prompt[0]",
+ "message": "Additional properties are not allowed ('tags' was unexpected)"
+ },
+ "num_sub_errors": 5,
"sub_errors": [
{
"path": "$[0]",
diff --git a/test/schemas/negative_test/playbooks/when.yml.md b/test/schemas/negative_test/playbooks/when.yml.md
index 4c23dcb..125e9d6 100644
--- a/test/schemas/negative_test/playbooks/when.yml.md
+++ b/test/schemas/negative_test/playbooks/when.yml.md
@@ -195,6 +195,7 @@ stdout:
```json
{
"status": "fail",
+ "successes": [],
"errors": [
{
"filename": "negative_test/playbooks/when.yml",
@@ -205,6 +206,11 @@ stdout:
"path": "$[0]",
"message": "'gather_facts', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
},
+ "best_deep_match": {
+ "path": "$[0].tasks[0].when[1]",
+ "message": "123 is not of type 'boolean'"
+ },
+ "num_sub_errors": 17,
"sub_errors": [
{
"path": "$[0]",