Ansible action plugin to template arbitrary json ini yaml data
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 |
||
---|---|---|
action | ||
callback | ||
connection | ||
doc | ||
examples | ||
filter | ||
library | ||
lookup | ||
meta | ||
releasenotes | ||
strategy | ||
tests | ||
vars_plugins | ||
.gitignore | ||
.gitreview | ||
bindep.txt | ||
CONTRIBUTING.rst | ||
LICENSE | ||
manual-test.rc | ||
README.rst | ||
run_tests.sh | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini | ||
Vagrantfile |