Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor literal-compare tests (#3265)
- Loading branch information
Showing
6 changed files
with
79 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
- name: Fixture for literal-compare | ||
hosts: localhost | ||
tasks: | ||
- name: Example task # <-- 1st | ||
ansible.builtin.debug: | ||
msg: test | ||
when: my_var == True | ||
|
||
- name: Example task # <-- 2nd | ||
ansible.builtin.debug: | ||
msg: test | ||
when: my_var == false | ||
|
||
- name: Another example task # <-- 3rd | ||
ansible.builtin.debug: | ||
msg: test | ||
when: | ||
- my_var == false |
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,25 @@ | ||
--- | ||
- name: Fixture for literal-compare | ||
hosts: localhost | ||
tasks: | ||
- name: Example task | ||
ansible.builtin.debug: | ||
msg: test | ||
when: my_var | ||
|
||
- name: Another example task | ||
ansible.builtin.debug: | ||
msg: test | ||
when: | ||
- 1 + 1 == 2 | ||
- true | ||
|
||
- name: Example task | ||
ansible.builtin.debug: | ||
msg: test | ||
when: not my_var | ||
|
||
- name: Example task | ||
ansible.builtin.debug: | ||
msg: test | ||
when: my_var not None |
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
This file was deleted.
Oops, something went wrong.