-
Notifications
You must be signed in to change notification settings - Fork 23.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow any_errors_fatal to be dynamic
This change updates the linear and free strategies to ensure that the value of any_errors_fatal is properly evaluated if it contains a dynamic value. Previously if it was not set to a boolean false, it would be true. Fixes #61025
- Loading branch information
Showing
7 changed files
with
77 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
test/integration/targets/any_errors_fatal/61025-bad_dynamic_value.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- hosts: all | ||
gather_facts: false | ||
any_errors_fatal: false | ||
ignore_unreachable: true | ||
vars: | ||
skip_errors: "silliness" | ||
tasks: | ||
- block: | ||
- name: EXPECTED FAILURE any_errors_fatal, simulate failure on one node | ||
shell: exit 1 | ||
when: inventory_hostname == "testhost" | ||
- debug: | ||
msg: "any_errors_fatal_dynamic_value_continues" | ||
any_errors_fatal: "{{ skip_errors }}" |
14 changes: 14 additions & 0 deletions
14
test/integration/targets/any_errors_fatal/61025-dynamic_block.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- hosts: all | ||
gather_facts: false | ||
any_errors_fatal: false | ||
ignore_unreachable: true | ||
vars: | ||
skip_errors: true | ||
tasks: | ||
- block: | ||
- name: EXPECTED FAILURE any_errors_fatal, simulate failure on one node | ||
shell: exit 1 | ||
when: inventory_hostname == "testhost" | ||
- debug: | ||
msg: "any_errors_fatal_dynamic_value_continues" | ||
any_errors_fatal: "{{ not skip_errors }}" |
3 changes: 3 additions & 0 deletions
3
test/integration/targets/any_errors_fatal/61025-import_playbook.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- import_playbook: dynamic_playbook.yml | ||
vars: | ||
skip_errors: true |
9 changes: 9 additions & 0 deletions
9
test/integration/targets/any_errors_fatal/dynamic_playbook.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- hosts: all | ||
gather_facts: false | ||
any_errors_fatal: "{{ not skip_errors }}" | ||
tasks: | ||
- name: EXPECTED FAILURE any_errors_fatal, simulate failure on one node | ||
shell: exit 1 | ||
when: inventory_hostname == "testhost" | ||
- debug: | ||
msg: "any_errors_fatal_dynamic_value_import_playbook_continues" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters