Difference: AnsibleTipsTricks (8 vs. 9)

Revision 917 Jan 2022 - IvoVanGeel

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

Ansible tips & tricks

Line: 83 to 83
 

Sort list of dictionaries by subitem

Use "{{ variable | sort(attribute='key_name') }}"

Added:
>
>

Searching a string in a when statement

Use: when: my_string is match(pattern)

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

 

Add a string to a string

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