Python object methods

Jinja2 is a Python-based template engine, and so Python object methods are available within templates. Object methods are methods, or functions, which are directly accessible by the variable object (typically a string, list, int, or float). A good way to think about this is as follows: if you were writing Python code and could write the variable, then a period, then a method call, then you would have access to do the same in Jinja2. Within Ansible, only methods that return modified content or a Boolean are typically used. Let's explore some common object methods that might be useful in Ansible.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.123.34