- Learning Ansible 2.7(Third Edition)
- Fabio Alessandro Locati
- 68字
- 2021-06-24 15:08:46
Filters
From time to time, we may want to change the style of a string a little bit, without writing specific code for it; for example, we may want to capitalize some text. To do so, we can use one of Jinja2's filters, such as {{ VARIABLE_NAME | capitalize }}. There are many filters available for Jinja2, and you can find the full list at http://jinja.pocoo.org/docs/dev/templates/#builtin-filters.