Use json_query whenever possible

Bug #1769100 reported by Jean-Philippe Evrard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Won't Fix
Wishlist
Unassigned

Bug Description

We should probably use json_query, making use of jmespath, in our playbooks/roles more, to
simplify things like:

    - ansible_local is defined
    - ansible_local.openstack_ansible is defined
    - ansible_local.openstack_ansible.glance is defined
    - ansible_local.openstack_ansible.glance.install_method is defined
    - ansible_local.openstack_ansible.glance.install_method != glance_install_method

to a single line.

It also helps getting the data into a sepecific format without being too hard to read.

Please read the jmespath [1] and json_query [2] documentation

[1]: http://jmespath.org/examples.html
[2]: http://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#json-query-filter

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Jonathan Rosser (jrosser) wrote :

Opinion in the #ansible IRC channel is to dissuade use of json-query in general when other mechanisms are supported.

Changed in openstack-ansible:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.