80a1262252
When accessing nested facts, such as in ansible_local sections, guard statements in the when clause can get quite long, due to having to repeate the 'in/not in' logic for every key at every level. The get_nested filter attempts to instead to move the guard into a single line, making the conditions easier to write and maintain. As example, ('openstack_ansible' not in ansible_local or 'swift' not in ansible_local['openstack_ansible'] or 'venv_tag' not in ansible_local['openstack_ansible']['swift'] or ansible_local['openstack_ansible']['swift']['venv_tag'] == swift_venv_tag) could be rewritten as get_nested(ansible_local, 'openstack_ansible.swift.venv_tag') == swift_venv_tag Change-Id: I3b43c25c8783c43cf5285f2b3e7267b2c5712ea0 |
||
---|---|---|
.. | ||
config_template-MultiStrOps-support-c28e33fd5044e14d.yaml | ||
config-template-ignore-none-type-9387c236853f061b.yaml | ||
force-dep-order-2c529683509e45da.yaml | ||
get_nested_filter-b89828586d7e2520.yaml | ||
get-networks-e241137620c2280d.yaml | ||
keystone_plugin_default_update-c025bd5508069df3.yaml | ||
keystone_user_and_project_support-e35b0b335b6522e9.yaml | ||
list-extend-toggle-46a75ded97b7ce02.yaml | ||
network_sriov_mappings-7e4c9bcb164625c3.yaml | ||
opportunistic-strategy-and-connection-plugin-bc476fa3607dcc4a.yaml | ||
plugins-remove-glance-0034a2192f91da7c.yaml | ||
plugins-remove-neutron-cbea1235e030e4f5.yaml | ||
userspace_group_and_host_vars-14f77b5eb518e32d.yaml |