   (put (:host server) (str (module :src) (module :name) ".tar.gz")  "/tmp"))
 
 (defn execute [server & batch]
-  (let [agent (ssh-agent {}) session (session agent (server :host) {:username "root"}) ]
+  (let [agent (ssh-agent {}) session (session agent (server :host) ssh-opts) ]
     (with-connection session
       (let [result (ssh session {:in  (join "\n" batch ) })]
         (println result)))))

(ns com.narkisr.celestial.puppet-standalone
  "A standalone puppet provisioner"
  (:use 
    clojure.core.strint
    com.narkisr.celestial.core
    clj-ssh.ssh
    [clojure.string :only (join)]
    ))


(defn put [host file dest]
  (let [agent (ssh-agent {}) session (session agent host {:username "root"}) ]
    (with-connection session
      (let [channel (ssh-sftp session)]
        (with-channel-connection channel
          (sftp channel {} :put file dest)

    ))

#_(.apply 
    (Standalone. {:host "192.168.5.203"} {:name "puppet-base-env" :src "/home/ronen/code/"}))

