-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb53a27
commit 2f92c5a
Showing
4 changed files
with
54 additions
and
0 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,13 @@ | ||
- name: Test when condition | ||
hosts: local | ||
tasks: | ||
- name: should run when condition is true | ||
shell: echo "Condition is true" | ||
when: condition == "true" | ||
|
||
- name: should not run when condition is false | ||
shell: echo "Condition is false" | ||
when: condition == "false" | ||
|
||
- name: always run | ||
shell: echo "Always run" |
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,12 @@ | ||
Starting deployment: Test when condition | ||
|
||
Executing task: should run when condition is true | ||
> echo "Condition is true" | ||
Condition is true | ||
|
||
Skipping task: should not run when condition is false | ||
|
||
Executing task: always run | ||
> echo "Always run" | ||
Always run | ||
|
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