Skip to content

Commit

Permalink
Update schemas (#2223)
Browse files Browse the repository at this point in the history
* Update schemas

* Update eco results

* Update playbook schema

* Update eco

Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
  • Loading branch information
jeefberkey and ssbarnea committed Jul 4, 2022
1 parent 4c4eb53 commit d42c594
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 3,087 deletions.
3 changes: 3 additions & 0 deletions src/ansiblelint/schemas/meta.json
Expand Up @@ -538,6 +538,9 @@
{
"$ref": "#/$defs/opensusePlatformModel"
},
{
"$ref": "#/$defs/OpenWRTPlatformModel"
},
{
"$ref": "#/$defs/os10PlatformModel"
},
Expand Down
38 changes: 35 additions & 3 deletions src/ansiblelint/schemas/playbook.json
Expand Up @@ -41,6 +41,10 @@
"vars": {
"title": "Vars",
"type": "object"
},
"when": {
"$ref": "#/$defs/complex_conditional",
"title": "When"
}
},
"type": "object"
Expand Down Expand Up @@ -349,8 +353,36 @@
"type": "boolean"
},
"gather_subset": {
"items": {
"anyOf": [
{
"enum": [
"all",
"min",
"hardware",
"network",
"virtual",
"ohai",
"facter"
],
"type": "string"
},
{
"enum": [
"!all",
"!min",
"!hardware",
"!network",
"!virtual",
"!ohai",
"!facter"
],
"type": "string"
}
]
},
"title": "Gather Subset",
"type": "boolean"
"type": "array"
},
"gather_timeout": {
"$ref": "#/$defs/templated-integer",
Expand Down Expand Up @@ -847,8 +879,8 @@
"title": "Timeout"
},
"until": {
"title": "Until",
"type": "string"
"$ref": "#/$defs/complex_conditional",
"title": "Until"
},
"vars": {
"title": "Vars",
Expand Down
4 changes: 2 additions & 2 deletions src/ansiblelint/schemas/tasks.json
Expand Up @@ -441,8 +441,8 @@
"title": "Timeout"
},
"until": {
"title": "Until",
"type": "string"
"$ref": "#/$defs/complex_conditional",
"title": "Until"
},
"vars": {
"title": "Vars",
Expand Down
6 changes: 1 addition & 5 deletions test/eco/bootstrap.result
Expand Up @@ -3,19 +3,15 @@ CMD: ansible-lint -f pep8 -x fqcn-builtins
RC: 2

STDERR:
WARNING Listing 7 violation(s) that are fatal
WARNING Listing 4 violation(s) that are fatal
You can skip specific rules or tags by adding them to your configuration file:
# .config/ansible-lint.yml
warn_list: # or 'skip_list' to silence them completely
- experimental # all rules tagged as experimental
- var-spacing # Jinja2 variables and filters should have spaces before and after.



STDOUT:
.github/workflows/galaxy.yml:1: schema: Additional properties are not allowed ('jobs', 'true' were unexpected) (schema[galaxy])
meta/main.yml:1: schema: 7 is not one of ['6.1', '7.1', '7.2', 'all'] (schema[meta])
requirements.yml:1: schema: None is not of type 'array' (schema[requirements])
vars/main.yml:18: var-spacing: Jinja2 variables and filters should have spaces before and after.
vars/main.yml:33: var-spacing: Jinja2 variables and filters should have spaces before and after.
vars/main.yml:44: var-spacing: Jinja2 variables and filters should have spaces before and after.
Expand Down
3,061 changes: 1 addition & 3,060 deletions test/eco/debops.result

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions test/eco/docker-rootless.result
@@ -1,13 +1,9 @@
CMD: ansible-lint -f pep8 -x fqcn-builtins

RC: 2
RC: 0

STDERR:
WARNING Listing 3 violation(s) that are fatal
You can skip specific rules or tags by adding them to your configuration file:
# .config/ansible-lint.yml
warn_list: # or 'skip_list' to silence them completely
- var-spacing # Jinja2 variables and filters should have spaces before and after.



Expand Down
21 changes: 9 additions & 12 deletions test/eco/hardening.result
@@ -1,28 +1,25 @@
CMD: ansible-lint -f pep8 -x fqcn-builtins

RC: 2
RC: 0

STDERR:
WARNING Listing 18 violation(s) that are fatal
You can skip specific rules or tags by adding them to your configuration file:
# .config/ansible-lint.yml
warn_list: # or 'skip_list' to silence them completely
- var-spacing # Jinja2 variables and filters should have spaces before and after.
WARNING Listing 19 violation(s) that are fatal



STDOUT:
defaults/main/sshd.yml:20: yaml: line too long (143 > 120 characters) (yaml[line-length])
molecule/default/verify.yml:11: var-spacing: Jinja2 variables and filters should have spaces before and after.
molecule/default/verify.yml:123: yaml: line too long (123 > 120 characters) (yaml[line-length])
molecule/default/verify.yml:124: yaml: line too long (122 > 120 characters) (yaml[line-length])
molecule/default/verify.yml:148: var-spacing: Jinja2 variables and filters should have spaces before and after.
molecule/default/verify.yml:194: var-spacing: Jinja2 variables and filters should have spaces before and after.
molecule/default/verify.yml:241: var-spacing: Jinja2 variables and filters should have spaces before and after.
molecule/default/verify.yml:538: var-spacing: Jinja2 variables and filters should have spaces before and after.
molecule/default/verify.yml:127: yaml: line too long (123 > 120 characters) (yaml[line-length])
molecule/default/verify.yml:128: yaml: line too long (122 > 120 characters) (yaml[line-length])
molecule/default/verify.yml:152: var-spacing: Jinja2 variables and filters should have spaces before and after.
molecule/default/verify.yml:198: var-spacing: Jinja2 variables and filters should have spaces before and after.
molecule/default/verify.yml:245: var-spacing: Jinja2 variables and filters should have spaces before and after.
molecule/default/verify.yml:571: var-spacing: Jinja2 variables and filters should have spaces before and after.
tasks/auditd.yml:21: yaml: line too long (122 > 120 characters) (yaml[line-length])
tasks/firewall.yml:120: var-spacing: Jinja2 variables and filters should have spaces before and after.
tasks/firewall.yml:135: var-spacing: Jinja2 variables and filters should have spaces before and after.
tasks/ipv6.yml:29: var-spacing: Jinja2 variables and filters should have spaces before and after.
tasks/mount.yml:2: var-spacing: Jinja2 variables and filters should have spaces before and after.
tasks/packagemgmt.yml:164: yaml: line too long (129 > 120 characters) (yaml[line-length])
tasks/packagemgmt.yml:192: yaml: line too long (162 > 120 characters) (yaml[line-length])
Expand Down

0 comments on commit d42c594

Please sign in to comment.