Learning Ansible 2.7(Third Edition)
上QQ阅读APP看书,第一时间看更新

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.