Repository: comtrya/comtrya (language: rust)

Issue:
Support {{os.hostname}} as variable
Like this:

```yaml
actions:
    - action: command.run
      command: echo
       where: os.hostname=="test"
```


Discussion / hints:
https://crates.io/crates/gethostname

Fix patch:
diff --git a/lib/Cargo.toml b/lib/Cargo.toml
index e6d1289e..27f75495 100644
--- a/lib/Cargo.toml
+++ b/lib/Cargo.toml
@@ -13,6 +13,7 @@ dirs-next = "2.0.0"
 eval = "0.4.3"
 file_diff = "1.0.0"
 fs_extra = "1.2.0"
+gethostname = "0.2.3"
 gitsync = "0.1.6"
 ignore = "0.4.18"
 normpath = "0.3.2"
diff --git a/lib/src/contexts/os.rs b/lib/src/contexts/os.rs
index fb37ec58..042ab076 100644
--- a/lib/src/contexts/os.rs
+++ b/lib/src/contexts/os.rs
@@ -1,4 +1,5 @@
 use crate::contexts::{Context, ContextProvider};
+use gethostname::gethostname;
 use os_info;
 
 pub struct OSContextProvider {}
@@ -12,6 +13,10 @@ impl ContextProvider for OSContextProvider {
         let osinfo = os_info::get();
 
         vec![
+            Context::KeyValueContext(
+                String::from("hostname"),
+                gethostname().into_string().unwrap(),
+            ),
             Context::KeyValueContext(String::from("family"), std::env::consts::FAMILY.to_string()),
             Context::KeyValueContext(String::from("name"), std::env::consts::OS.to_string()),
             Context::KeyValueContext(


Test patch: