Difference: AnsibleTipsTricks (6 vs. 7)

Revision 707 Dec 2021 - IvoVanGeel

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

Ansible tips & tricks

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

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

Added:
>
>

Filter a list of strings

Use "{{ variable | select('match', 'some string') | 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

 

Sort list of dictionaries by subitem

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