fixes to allow the provisioner container to run ansible on remote nodes
diff --git a/provisioner/handlers.go b/provisioner/handlers.go
index 11df6ee..42946da 100644
--- a/provisioner/handlers.go
+++ b/provisioner/handlers.go
@@ -101,5 +101,15 @@
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
+
+ switch s.Status {
+ case Pending, Running:
+ w.WriteHeader(http.StatusAccepted)
+ case Complete:
+ w.WriteHeader(http.StatusOK)
+ default:
+ w.WriteHeader(http.StatusInternalServerError)
+ }
+
w.Write(bytes)
}