Skip to content

Commit

Permalink
Make ignore_unreachable accept jinja templates (#4120)
Browse files Browse the repository at this point in the history
  • Loading branch information
audgirka authored Apr 30, 2024
1 parent 9ee0c98 commit dfb8fea
Show file tree
Hide file tree
Showing 6 changed files with 371 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/ansiblelint/schemas/ansible.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean"
},
"module_defaults": {
"title": "Module Defaults"
Expand Down Expand Up @@ -528,7 +528,7 @@
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean"
},
"max_fail_percentage": {
"title": "Max Fail Percentage",
Expand Down Expand Up @@ -732,7 +732,7 @@
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean"
},
"module_defaults": {
"title": "Module Defaults"
Expand Down Expand Up @@ -935,7 +935,7 @@
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean"
},
"listen": {
"anyOf": [
Expand Down
16 changes: 8 additions & 8 deletions src/ansiblelint/schemas/playbook.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@
"$ref": "#/$defs/ignore_errors"
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean",
"title": "Ignore Unreachable"
},
"module_defaults": {
"title": "Module Defaults"
Expand Down Expand Up @@ -537,8 +537,8 @@
"$ref": "#/$defs/ignore_errors"
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean",
"title": "Ignore Unreachable"
},
"max_fail_percentage": {
"$ref": "#/$defs/templated-integer",
Expand Down Expand Up @@ -747,8 +747,8 @@
"$ref": "#/$defs/ignore_errors"
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean",
"title": "Ignore Unreachable"
},
"module_defaults": {
"title": "Module Defaults"
Expand Down Expand Up @@ -947,8 +947,8 @@
"$ref": "#/$defs/ignore_errors"
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean",
"title": "Ignore Unreachable"
},
"include": {
"$ref": "#/$defs/removed-include-module"
Expand Down
8 changes: 4 additions & 4 deletions src/ansiblelint/schemas/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
"$ref": "#/$defs/ignore_errors"
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean",
"title": "Ignore Unreachable"
},
"module_defaults": {
"title": "Module Defaults"
Expand Down Expand Up @@ -382,8 +382,8 @@
"$ref": "#/$defs/ignore_errors"
},
"ignore_unreachable": {
"title": "Ignore Unreachable",
"type": "boolean"
"$ref": "#/$defs/templated-boolean",
"title": "Ignore Unreachable"
},
"include": {
"$ref": "#/$defs/removed-include-module"
Expand Down
13 changes: 13 additions & 0 deletions test/schemas/negative_test/playbooks/ignore-unreachable.yml
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit dfb8fea

Please sign in to comment.