Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refcatored to return output from run fns.
- Loading branch information
Showing
2 changed files
with
65 additions
and
57 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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
(ns saral.main | ||
(:require [saral.core :refer [converge dry-run get-converge-conf]] | ||
(:require [saral.core :refer [apply-config dry-run create-config]] | ||
[environ.core :refer [env]])) | ||
|
||
(def tags-config {:uat {:fns [["echo uat!!"] ["error me"]]} | ||
:prod {:fns [["echo prod!!"]]} | ||
:app-server {:fns [["cd /" "ls"] | ||
["echo hello {{say.hello}}"]] | ||
:config {:say {:hello "from run time config"}}}}) | ||
:args {:say {:hello "from run time config"}}}}) | ||
|
||
(comment | ||
(get-converge-conf tags-config (env :servers) [:uat :app-server] {:say {:hello "from converge"}}) | ||
(create-config tags-config (env :servers) [:uat :app-server] {:say {:hello "from converge"}}) | ||
(dry-run tags-config (env :servers) [:uat :app-server] {:say {:hello "from converge"}}) | ||
(converge tags-config (env :servers) [:uat] {:say {:hello "from converge"}})) | ||
(apply-config tags-config (env :servers) [:uat] {:say {:hello "from converge"}})) |