This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| automation:jinja2 [2017/05/27 14:31] – jotasandoku | automation:jinja2 [2023/11/02 14:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| **JINYA**\\ | **JINYA**\\ | ||
| - | It uses a template file (jinja) and a // | + | * Nice examples: https:// |
| + | * It uses a template file (jinja) and a // | ||
| + | * All the links plus a tutorial can be found [[http:// | ||
| + | * Loop with variable and multiple template and targets : [[http:// | ||
| + | \\ | ||
| + | Note that, in Ansible, ROLES are the ones that generate the configurations, | ||
| \\ | \\ | ||
| VARIABLE | VARIABLE | ||
| Line 16: | Line 21: | ||
| {% include " | {% include " | ||
| {% include " | {% include " | ||
| - | } | + | } |
| + | INCLUDING BLOCKS:\\ | ||
| + | Note that this is the parent configuration, | ||
| + | services { | ||
| + | ssh; | ||
| + | {% block dhcp %} | ||
| + | dhcp{ | ||
| + | pool 0.0.0.0/ | ||
| + | } | ||
| + | {% endblock dhcp %} | ||
| + | } | ||