Skip to content

Commit

Permalink
Updated JSON Schemas (#2177)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed May 24, 2022
1 parent 811d44d commit e6126f2
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 24 deletions.
29 changes: 29 additions & 0 deletions src/ansiblelint/schemas/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,13 @@
"title": "Min Ansible Version",
"type": "string"
},
"namespace": {
"markdownDescription": "Used by molecule and ansible-lint to compute FQRN for roles outside collections",
"minLength": 2,
"pattern": "^[a-z][a-z0-9_]+$",
"title": "Namespace Name",
"type": "string"
},
"platforms": {
"items": {
"anyOf": [
Expand Down Expand Up @@ -519,6 +526,9 @@
{
"$ref": "#/$defs/MacOSXPlatformModel"
},
{
"$ref": "#/$defs/MageiaPlatformModel"
},
{
"$ref": "#/$defs/NXOSPlatformModel"
},
Expand Down Expand Up @@ -748,6 +758,25 @@
"title": "MacOSXPlatformModel",
"type": "object"
},
"MageiaPlatformModel": {
"properties": {
"name": {
"const": "Mageia",
"title": "Name",
"type": "string"
},
"versions": {
"default": "all",
"items": {
"enum": ["7", "8", "all"],
"type": "string"
},
"type": "array"
}
},
"title": "MageiaPlatformModel",
"type": "object"
},
"NXOSPlatformModel": {
"properties": {
"name": {
Expand Down
12 changes: 6 additions & 6 deletions src/ansiblelint/schemas/playbook.json
Original file line number Diff line number Diff line change
Expand Up @@ -797,12 +797,12 @@
"title": "Notify"
},
"poll": {
"title": "Poll",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Poll"
},
"port": {
"title": "Port",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Port"
},
"register": {
"title": "Register",
Expand All @@ -813,8 +813,8 @@
"type": "string"
},
"retries": {
"title": "Retries",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Retries"
},
"run_once": {
"$ref": "#/$defs/templated-boolean",
Expand Down
12 changes: 6 additions & 6 deletions src/ansiblelint/schemas/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,12 @@
"title": "Notify"
},
"poll": {
"title": "Poll",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Poll"
},
"port": {
"title": "Port",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Port"
},
"register": {
"title": "Register",
Expand All @@ -390,8 +390,8 @@
"type": "string"
},
"retries": {
"title": "Retries",
"type": "integer"
"$ref": "#/$defs/templated-integer",
"title": "Retries"
},
"run_once": {
"$ref": "#/$defs/templated-boolean",
Expand Down
12 changes: 0 additions & 12 deletions test/eco/debops.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@ CMD: ansible-lint -f pep8 -x fqcn-builtins
RC: 0

STDERR:
WARNING Listing 6 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



STDOUT:
ansible/roles/boxbackup/meta/main.yml:1: schema: Additional properties are not allowed ('pki_authorities', 'pki_certificates', 'pki_private_groups_present', 'pki_realms', 'pki_routes' were unexpected) (schema[meta])
ansible/roles/lvm/vars/lvm_config_2.02.168.yml:1: schema: 'global' 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)$)[\\w]*$' (schema[vars])
ansible/roles/lvm/vars/lvm_config_debian_stretch.yml:1: schema: 'global' 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)$)[\\w]*$' (schema[vars])
ansible/roles/rails_deploy/meta/main.yml:1: schema: Additional properties are not allowed ('apt_preferences__dependent_list' was unexpected) (schema[meta])
roles/lvm/vars/lvm_config_2.02.168.yml:1: schema: 'global' 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)$)[\\w]*$' (schema[vars])
roles/lvm/vars/lvm_config_debian_stretch.yml:1: schema: 'global' 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)$)[\\w]*$' (schema[vars])

0 comments on commit e6126f2

Please sign in to comment.