Skip to content

Commit

Permalink
Add MarkUnsafe fix back (#44)
Browse files Browse the repository at this point in the history
add markunsafe back
  • Loading branch information
gaelgatelement committed Dec 18, 2023
1 parent f4cb021 commit bbe095f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/ansible/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ func (r *runner) makeParameters(u *unstructured.Unstructured) map[string]interfa

specKey := fmt.Sprintf("%s_spec", objKey)
parameters[specKey] = spec
if r.markUnsafe {
parameters[specKey] = markUnsafe(spec)
}

for k, v := range r.Vars {
parameters[k] = v
Expand All @@ -391,7 +394,7 @@ func (r *runner) makeParameters(u *unstructured.Unstructured) map[string]interfa
func markUnsafe(values interface{}) interface{} {
switch v := values.(type) {
case []interface{}:
var p []interface{}
p := make([]interface{}, 0)
for _, n := range v {
p = append(p, markUnsafe(n))
}
Expand Down

0 comments on commit bbe095f

Please sign in to comment.