Skip to content

Commit 917b3bc

Browse files
authored
Schema update (#3693)
1 parent 0afe99c commit 917b3bc

File tree

72 files changed

+342
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+342
-1
lines changed

src/ansiblelint/schemas/__store__.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/role-arg-spec.json"
4949
},
5050
"rulebook": {
51-
"etag": "607eeed6d517b942b4cf86c9b2f811757feccd9f7163e5298ebc8e1f2537c748",
51+
"etag": "ac546675ec70a8c0742b3502c9dc296a508c3dda9df09ca392b8e472fa8f9823",
5252
"url": "https://raw.githubusercontent.com/ansible/ansible-rulebook/main/ansible_rulebook/schema/ruleset_schema.json"
5353
},
5454
"tasks": {

test/schemas/negative_test/.ansible-lint.md

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ stdout:
128128
```json
129129
{
130130
"status": "fail",
131+
"successes": [],
131132
"errors": [],
132133
"parse_errors": [
133134
{

test/schemas/negative_test/.config/ansible-lint.yml.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ stdout:
2929
```json
3030
{
3131
"status": "fail",
32+
"successes": [],
3233
"errors": [
3334
{
3435
"filename": "negative_test/.config/ansible-lint.yml",

test/schemas/negative_test/changelogs/invalid-date/changelogs/changelog.yaml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/changelogs/invalid-date/changelogs/changelog.yaml",

test/schemas/negative_test/changelogs/invalid-plugin-namespace/changelogs/changelog.yaml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/changelogs/invalid-plugin-namespace/changelogs/changelog.yaml",

test/schemas/negative_test/changelogs/list/changelogs/changelog.yaml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/changelogs/list/changelogs/changelog.yaml",

test/schemas/negative_test/changelogs/no-semver/changelogs/changelog.yaml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/changelogs/no-semver/changelogs/changelog.yaml",

test/schemas/negative_test/changelogs/unknown-keys/changelogs/changelog.yaml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/changelogs/unknown-keys/changelogs/changelog.yaml",

test/schemas/negative_test/galaxy_1/galaxy.yml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/galaxy_1/galaxy.yml",

test/schemas/negative_test/inventory/broken_dev_inventory.yml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/inventory/broken_dev_inventory.yml",

test/schemas/negative_test/meta/runtime.yml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/meta/runtime.yml",

test/schemas/negative_test/molecule/platforms_children/molecule.yml.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ stdout:
2121
```json
2222
{
2323
"status": "fail",
24+
"successes": [],
2425
"errors": [
2526
{
2627
"filename": "negative_test/molecule/platforms_children/molecule.yml",

test/schemas/negative_test/molecule/platforms_networks/molecule.yml.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ stdout:
3030
```json
3131
{
3232
"status": "fail",
33+
"successes": [],
3334
"errors": [
3435
{
3536
"filename": "negative_test/molecule/platforms_networks/molecule.yml",

test/schemas/negative_test/playbooks/environment.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ stdout:
9191
```json
9292
{
9393
"status": "fail",
94+
"successes": [],
9495
"errors": [
9596
{
9697
"filename": "negative_test/playbooks/environment.yml",
@@ -101,6 +102,11 @@ stdout:
101102
"path": "$[0]",
102103
"message": "'environment', 'hosts' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
103104
},
105+
"best_deep_match": {
106+
"path": "$[0].environment",
107+
"message": "'{{ foo }}-123' is not of type 'object'"
108+
},
109+
"num_sub_errors": 6,
104110
"sub_errors": [
105111
{
106112
"path": "$[0]",

test/schemas/negative_test/playbooks/failed_when.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ stdout:
118118
```json
119119
{
120120
"status": "fail",
121+
"successes": [],
121122
"errors": [
122123
{
123124
"filename": "negative_test/playbooks/failed_when.yml",
@@ -128,6 +129,11 @@ stdout:
128129
"path": "$[0]",
129130
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
130131
},
132+
"best_deep_match": {
133+
"path": "$[0].tasks[0].failed_when",
134+
"message": "123 is not of type 'boolean'"
135+
},
136+
"num_sub_errors": 9,
131137
"sub_errors": [
132138
{
133139
"path": "$[0]",

test/schemas/negative_test/playbooks/gather_facts.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ stdout:
102102
```json
103103
{
104104
"status": "fail",
105+
"successes": [],
105106
"errors": [
106107
{
107108
"filename": "negative_test/playbooks/gather_facts.yml",
@@ -112,6 +113,11 @@ stdout:
112113
"path": "$[0]",
113114
"message": "'gather_facts', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
114115
},
116+
"best_deep_match": {
117+
"path": "$[0].gather_facts",
118+
"message": "'non' is not of type 'boolean'"
119+
},
120+
"num_sub_errors": 6,
115121
"sub_errors": [
116122
{
117123
"path": "$[0]",

test/schemas/negative_test/playbooks/gather_subset.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ stdout:
8484
```json
8585
{
8686
"status": "fail",
87+
"successes": [],
8788
"errors": [
8889
{
8990
"filename": "negative_test/playbooks/gather_subset.yml",
@@ -94,6 +95,11 @@ stdout:
9495
"path": "$[0]",
9596
"message": "'gather_subset', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
9697
},
98+
"best_deep_match": {
99+
"path": "$[0].gather_subset",
100+
"message": "'all' is not of type 'array'"
101+
},
102+
"num_sub_errors": 4,
97103
"sub_errors": [
98104
{
99105
"path": "$[0]",

test/schemas/negative_test/playbooks/gather_subset2.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ stdout:
230230
```json
231231
{
232232
"status": "fail",
233+
"successes": [],
233234
"errors": [
234235
{
235236
"filename": "negative_test/playbooks/gather_subset2.yml",
@@ -240,6 +241,11 @@ stdout:
240241
"path": "$[0]",
241242
"message": "'gather_subset', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
242243
},
244+
"best_deep_match": {
245+
"path": "$[0].gather_subset[0]",
246+
"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']"
247+
},
248+
"num_sub_errors": 6,
243249
"sub_errors": [
244250
{
245251
"path": "$[0]",

test/schemas/negative_test/playbooks/gather_subset3.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ stdout:
248248
```json
249249
{
250250
"status": "fail",
251+
"successes": [],
251252
"errors": [
252253
{
253254
"filename": "negative_test/playbooks/gather_subset3.yml",
@@ -258,6 +259,11 @@ stdout:
258259
"path": "$[0]",
259260
"message": "'gather_subset', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
260261
},
262+
"best_deep_match": {
263+
"path": "$[0].gather_subset[0]",
264+
"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']"
265+
},
266+
"num_sub_errors": 8,
261267
"sub_errors": [
262268
{
263269
"path": "$[0]",

test/schemas/negative_test/playbooks/gather_subset4.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ stdout:
8484
```json
8585
{
8686
"status": "fail",
87+
"successes": [],
8788
"errors": [
8889
{
8990
"filename": "negative_test/playbooks/gather_subset4.yml",
@@ -94,6 +95,11 @@ stdout:
9495
"path": "$[0]",
9596
"message": "'gather_subset', 'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
9697
},
98+
"best_deep_match": {
99+
"path": "$[0].gather_subset",
100+
"message": "1 is not of type 'array'"
101+
},
102+
"num_sub_errors": 4,
97103
"sub_errors": [
98104
{
99105
"path": "$[0]",

test/schemas/negative_test/playbooks/ignore_errors.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ stdout:
136136
```json
137137
{
138138
"status": "fail",
139+
"successes": [],
139140
"errors": [
140141
{
141142
"filename": "negative_test/playbooks/ignore_errors.yml",
@@ -146,6 +147,11 @@ stdout:
146147
"path": "$[0]",
147148
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
148149
},
150+
"best_deep_match": {
151+
"path": "$[0].tasks[0].ignore_errors",
152+
"message": "'should_ignore_errors' is not of type 'boolean'"
153+
},
154+
"num_sub_errors": 11,
149155
"sub_errors": [
150156
{
151157
"path": "$[0]",

test/schemas/negative_test/playbooks/import_playbook.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ stdout:
5555
```json
5656
{
5757
"status": "fail",
58+
"successes": [],
5859
"errors": [
5960
{
6061
"filename": "negative_test/playbooks/import_playbook.yml",
@@ -65,6 +66,11 @@ stdout:
6566
"path": "$[0]",
6667
"message": "{'ansible.builtin.import_playbook': {}} should not be valid under {'required': ['ansible.builtin.import_playbook']}"
6768
},
69+
"best_deep_match": {
70+
"path": "$[0].ansible.builtin.import_playbook",
71+
"message": "{} is not of type 'string'"
72+
},
73+
"num_sub_errors": 3,
6874
"sub_errors": [
6975
{
7076
"path": "$[0].ansible.builtin.import_playbook",

test/schemas/negative_test/playbooks/import_playbook_exclusive.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ stdout:
8585
```json
8686
{
8787
"status": "fail",
88+
"successes": [],
8889
"errors": [
8990
{
9091
"filename": "negative_test/playbooks/import_playbook_exclusive.yml",
@@ -95,6 +96,11 @@ stdout:
9596
"path": "$[0]",
9697
"message": "{'ansible.builtin.import_playbook': 'foo.yml', 'import_playbook': 'other.yml'} should not be valid under {'required': ['ansible.builtin.import_playbook']}"
9798
},
99+
"best_deep_match": {
100+
"path": "$[0]",
101+
"message": "{'ansible.builtin.import_playbook': 'foo.yml', 'import_playbook': 'other.yml'} should not be valid under {'required': ['import_playbook']}"
102+
},
103+
"num_sub_errors": 6,
98104
"sub_errors": [
99105
{
100106
"path": "$[0]",

test/schemas/negative_test/playbooks/invalid-failed-when.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ stdout:
170170
```json
171171
{
172172
"status": "fail",
173+
"successes": [],
173174
"errors": [
174175
{
175176
"filename": "negative_test/playbooks/invalid-failed-when.yml",
@@ -180,6 +181,11 @@ stdout:
180181
"path": "$[0]",
181182
"message": "'hosts', 'tasks' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
182183
},
184+
"best_deep_match": {
185+
"path": "$[0].tasks[0].failed_when",
186+
"message": "123 is not of type 'boolean'"
187+
},
188+
"num_sub_errors": 15,
183189
"sub_errors": [
184190
{
185191
"path": "$[0]",

test/schemas/negative_test/playbooks/invalid-serial.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ stdout:
118118
```json
119119
{
120120
"status": "fail",
121+
"successes": [],
121122
"errors": [
122123
{
123124
"filename": "negative_test/playbooks/invalid-serial.yml",
@@ -128,6 +129,11 @@ stdout:
128129
"path": "$[0]",
129130
"message": "'hosts', 'serial' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
130131
},
132+
"best_deep_match": {
133+
"path": "$[0].serial",
134+
"message": "'10%BAD' is not of type 'integer'"
135+
},
136+
"num_sub_errors": 9,
131137
"sub_errors": [
132138
{
133139
"path": "$[0]",

test/schemas/negative_test/playbooks/invalid.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ stdout:
4646
```json
4747
{
4848
"status": "fail",
49+
"successes": [],
4950
"errors": [
5051
{
5152
"filename": "negative_test/playbooks/invalid.yml",
@@ -56,6 +57,11 @@ stdout:
5657
"path": "$[0]",
5758
"message": "{'name': 'foo', 'hosts': 'localhost', 'import_playbook': 'included.yml'} should not be valid under {'required': ['import_playbook']}"
5859
},
60+
"best_deep_match": {
61+
"path": "$[0]",
62+
"message": "'hosts' does not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
63+
},
64+
"num_sub_errors": 2,
5965
"sub_errors": [
6066
{
6167
"path": "$[0]",

test/schemas/negative_test/playbooks/invalid_become.yml.md

+6
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ stdout:
9393
```json
9494
{
9595
"status": "fail",
96+
"successes": [],
9697
"errors": [
9798
{
9899
"filename": "negative_test/playbooks/invalid_become.yml",
@@ -103,6 +104,11 @@ stdout:
103104
"path": "$[0]",
104105
"message": "'become', 'hosts' do not match any of the regexes: '^(ansible\\\\.builtin\\\\.)?import_playbook$', 'name', 'tags', 'vars', 'when'"
105106
},
107+
"best_deep_match": {
108+
"path": "$[0].become",
109+
"message": "'yes' is not of type 'boolean'"
110+
},
111+
"num_sub_errors": 6,
106112
"sub_errors": [
107113
{
108114
"path": "$[0]",

0 commit comments

Comments
 (0)