Skip to content

Commit

Permalink
convert stdout to string before unmarshal it
Browse files Browse the repository at this point in the history
  • Loading branch information
edo-aleix-penella committed Aug 19, 2022
1 parent a6cc7b1 commit aa11a2e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func main() {

for _, play := range res.Plays {
for _, task := range play.Tasks {
if task.Task.Name == "walk-through-json-output-ansibleplaybook" {
if task.Task.Name == "ansibleplaybook-walk-through-json-output" {
for _, content := range task.Hosts {

err = json.Unmarshal([]byte(content.Stdout), &msgOutput)
err = json.Unmarshal([]byte(fmt.Sprint(content.Stdout)), &msgOutput)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit aa11a2e

Please sign in to comment.