Skip to content

ansible operator failed when json_query filter is used #2237

@luciferinlove

Description

@luciferinlove

Bug Report

What did you do?
I have ansible operator generated with:

operator-sdk new ansible-operator --type ansible --kind TestConfig --api-version test.test/v1alpha1 --generate-playbook

I've created the role with json_query filter in some steps. When I run ansible-operator I've got the error.

What did you expect to see?
Steps with json_query filter must be succeeded.

What did you see instead? Under which circumstances?
I see the error in operator logs:

fatal: [localhost]: FAILED! => {"msg": "You need to install \"jmespath\" prior to running json_query filter"}

Environment

  • operator-sdk version:

operator-sdk version: "v0.12.0", commit: "2445fcda834ca4b7cf0d6c38fba6317fb219b469"

  • go version:

go version: "go1.13.3 linux/amd64"

  • Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:05:50Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:05:50Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
  • Kubernetes cluster kind:

  • Are you writing your operator in ansible, helm, or go?

ansible

Possible Solution
pip jmespath module must be installed in default ansible operator container

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

language/ansibleIssue is related to an Ansible operator projecttriage/supportIndicates an issue that is a support question.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions