Description of problem: Use of the json_query filter requires the presence of python-jmespath. Version-Release number of selected component (if applicable): 2.3.2.0-1.el7 How reproducible: easily Steps to Reproduce: using tests: test/runner/ansible-test integration -vvv posix/ci/ --start-at filters not using tests: ansible -vv localhost -m debug --extra-vars '{"c": {"pacman":"mrs","ghosts":["inky","pinky","clyde","sue"]}}' -a msg="{{ c | json_query('ghosts[1]') }}" Actual results: using tests: TASK [filters : Test json_query filter] **************************************** task path: /root/rpmbuild/BUILD/ansible-2.3.2.0/test/integration/targets/filters/tasks/main.yml:118 fatal: [testhost]: FAILED! => { "failed": true, "msg": "The conditional check 'users | json_query('[*].hosts[].host') == ['host_a', 'host_b', 'host_c', 'host_d']' failed. The error was: You need to install \"jmespath\" prior to running json_query filter" } to retry, use: --limit @/root/rpmbuild/BUILD/ansible-2.3.2.0/test/integration/filters-KU_0v0.retry PLAY RECAP ********************************************************************* testhost : ok=18 changed=8 unreachable=0 failed=1 NOTICE: To resume at this test target, use the option: --start-at filters NOTICE: To resume after this test target, use the option: --start-at gathering_facts ERROR: Command "ansible-playbook filters-KU_0v0.yml -i inventory -e @integration_config.yml -vvv" returned exit status 2. not using tests: localhost | FAILED! => { "failed": true, "msg": "You need to install \"jmespath\" prior to running json_query filter" } Expected results: using tests: test succeeds. not using tests: localhost | SUCCESS => { "msg": "pinky" }
Fedora bug: #1465586
Yes, this is planned for 7.4.2. I am adding the pm_ack+ for this.
ansible-2.4.0.0-5.el7 contains python2-jmespath as requirement, also ansible integration tests for filter module passes.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2966
I've just checked ansible-2.4.1.0-1.el7 [1] and dependency on python-jmespath is again missing although it's present on upstream build [2]. New bug or reopen this one? [1] https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=620845 [2] https://koji.fedoraproject.org/koji/buildinfo?buildID=992214
(In reply to Martin Perina from comment #16) > I've just checked ansible-2.4.1.0-1.el7 [1] and dependency on > python-jmespath is again missing although it's present on upstream build [2]. > > New bug or reopen this one? > > > [1] https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=620845 > [2] https://koji.fedoraproject.org/koji/buildinfo?buildID=992214 See comment #10: "If the solution does not work for you, open a new bug report."
OK, created BZ1513470 for that