Skip to content

Instantly share code, notes, and snippets.

(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"))
(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
(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)))
)