Difference: AnsibleTipsTricks (4 vs. 5)

Revision 517 Nov 2021 - IvoVanGeel

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Ansible tips & tricks

Line: 61 to 61
 Use "{{ variable | selectattr('key_name', 'match', 'value') | list }}"

Instead of match, you can also use search or regex. See: https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#testing-strings

Added:
>
>
See the Jinja2 documentation for a list of available tests: https://jinja.palletsprojects.com/en/2.9.x/templates/#list-of-builtin-tests
 

Sort list of dictionaries by subitem

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2010-2019 by LANIS