Skip to content

Commit

Permalink
Update to allow jinja templating
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlovelltroy committed Nov 14, 2024
1 parent fca4fb5 commit 2ebfab3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/cloud-init-server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func (h CiHandler) AddEntry(w http.ResponseWriter, r *http.Request) {
render.JSON(w, r, ci.Name)
}


// AddUserEntry godoc
// @Summary Add a new user-data entry in specified cloud-init data
// @Description Add a new user-data entry in specified cloud-init data
Expand Down Expand Up @@ -136,7 +135,6 @@ func (h CiHandler) AddUserEntry(w http.ResponseWriter, r *http.Request) {
render.JSON(w, r, ci.Name)
}


// GetEntry godoc
// @Summary Get a cloud-init entry
// @Description Get a cloud-init entry
Expand Down Expand Up @@ -205,7 +203,7 @@ func (h CiHandler) getData(id string, dataKind ciDataKind, w http.ResponseWriter
var data *map[string]interface{}
switch dataKind {
case UserData:
w.Write([]byte("#cloud-config\n"))
w.Write([]byte("## template:jinja\n#cloud-config\n"))
data = &ci.CIData.UserData
case MetaData:
data = &ci.CIData.MetaData
Expand Down

0 comments on commit 2ebfab3

Please sign in to comment.