-
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
1627a61
commit adb41e9
Showing
8 changed files
with
165 additions
and
76 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
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,7 @@ | ||
use crate::common::Task; | ||
use crate::utils; | ||
|
||
pub fn process(include_file: &str) -> Result<Vec<Task>, Box<dyn std::error::Error>> { | ||
let included_tasks: Vec<Task> = utils::read_yaml(include_file)?; | ||
Ok(included_tasks) | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod command; | ||
pub mod debug; | ||
pub mod include_tasks; | ||
pub mod when; |
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,7 @@ | ||
- | ||
name: Task 1 | ||
command: echo "Include Task 1" | ||
|
||
- | ||
name: Task 2 | ||
command: echo "Include Task 2" |
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,8 @@ | ||
- name: Test | ||
hosts: test | ||
tasks: | ||
- name: Include tasks | ||
include_tasks: include-tasks.include.yml | ||
|
||
- name: Task after include tasks | ||
command: echo "Task after include tasks" |
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,18 @@ | ||
Starting deployment: Test | ||
|
||
Executing task: Include tasks | ||
Including tasks from: include-tasks.include.yml | ||
|
||
Executing task: Task 1 | ||
> echo "Include Task 1" | ||
Include Task 1 | ||
|
||
Executing task: Task 2 | ||
> echo "Include Task 2" | ||
Include Task 2 | ||
|
||
|
||
Executing task: Task after include tasks | ||
> echo "Task after include tasks" | ||
Task after include tasks | ||
|
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