TRUC
This commit is contained in:
parent
7d9e3d63b7
commit
89ef66a694
19 changed files with 461 additions and 64 deletions
6
examples/facts.rs
Normal file
6
examples/facts.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
use rustible::Facts;
|
||||
|
||||
fn main() {
|
||||
let facts = Facts::new();
|
||||
println!("rustible running system: {}", facts.os.family().as_str());
|
||||
}
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
use rustible::Facts;
|
||||
|
||||
use rustible::modules::{
|
||||
PlaybookRun,
|
||||
package::{PackageModule as Package, PackageState, PackageError},
|
||||
|
|
@ -25,9 +23,6 @@ impl From<PackageError> for PlaybookError {
|
|||
}
|
||||
|
||||
fn main() -> Result<(), PlaybookError> {
|
||||
let facts = Facts::new();
|
||||
println!("rustible running system: {}", facts.os.family().as_str());
|
||||
|
||||
let mut playbook = PlaybookRun::new();
|
||||
|
||||
let pkg = Package::new()
|
||||
|
|
@ -39,7 +34,7 @@ fn main() -> Result<(), PlaybookError> {
|
|||
let cmd = Command::new()
|
||||
.program("hello")
|
||||
.arg("-g")
|
||||
.arg("\"Welcome to rustible!\"")
|
||||
.arg("\"Welcome to rustible!\"")
|
||||
.build();
|
||||
|
||||
let res = playbook.run(cmd)?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue