![]() You can provide default values for variables directly in your templates using the Jinja2 ‘default’ filter. If you configure Ansible to ignore most undefined variables, you can mark some variables as requiring values with the mandatory filter. And I don't want contains IPs if a noptrrecord: true variable is defined (false or not defined is ok). I tried jsonquery () and selectattr () filters but I'm struggling on the fact that not every host entry has IPv4 or IPv6 addresses defined. ![]() Searching strings with regular expressionsįilters can help you manage missing or undefined variables by providing defaults or making some variables optional. Basically I just need list of all IPs of all zones. ![]() It is big, because it allows to perform complicated queries. Hashing and encrypting strings and passwords Data manipulation in Ansible: jsonquery The second big change in Ansible is an introduction of jsonquery filter in templates. Selecting from sets or lists (set theory) Selecting values from arrays or hashtables
0 Comments
Leave a Reply. |