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
(streams | |
(where (state "expired") | |
(do (fn [e] (let [new-event (assoc e :stat stat)] | |
(def rt (sh "ansible-playbook" "--private-key" "/home/ec2-user/ansib/keys/54.88.127.179.pem" "-i" "/home/ec2-user/ansib/inventory-54.88.127.179" "/home/ec2-user/ansib/playbook/test3.yml")) | |
(def qw (get rt :out)) | |
(reset! colstat (nth (re-find #"(\"msg\"): (\"(\d+)\")" qw) 3)) | |
(reset! stat (get rt :exit)) | |
(if (and (= @stat 0) (= @colstat "1")) (prn :yup) | |
(prn :nope)) | |
(if (and (= @stat 0) (= @colstat "1")) (rollup 1 1800 (email-ch "xxxx@gmail.com")) |
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
(include "globals.clj") | |
(def c-subj (atom "")) | |
(def temp1 (atom 0)) | |
(def m1_flag (atom "")) | |
(def m2_flag (atom "")) | |
(def temp3 (atom 0)) | |
(def flag (atom 0)) | |
(def temp2 (atom 0)) | |
(def email-c (mailer {:host "smtp.gmail.com" | |
:port 587 |
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
(def temp1 0) | |
(def m1_flag "") | |
(def m2_flag "") | |
(def temp3 (atom 0)) | |
(def temp2 0) | |
(defn gt [& children] | |
(fn [e] ( | |
(def c-subj (str (get e :host))) | |
((email-c "xxxxxyyyy@gmail.com") e))) | |
) |