Add 'toyaml()' jinja2 function
Syntax is like for built-in 'indent' filter, but must be used as
function:
{{ toyaml(data, width=0, indentfirst=False) }}
Change-Id: I067062f03a77af20c40641056d2d5e15b2c0ef09
diff --git "a/examples/environment/\173\173 cookiecutter.cluster_name \175\175/init.yml" "b/examples/environment/\173\173 cookiecutter.cluster_name \175\175/init.yml"
index d1b5b7f..f7a1b70 100644
--- "a/examples/environment/\173\173 cookiecutter.cluster_name \175\175/init.yml"
+++ "b/examples/environment/\173\173 cookiecutter.cluster_name \175\175/init.yml"
@@ -15,7 +15,8 @@
# For example, you can take the 'inventory_node_name' and find it's config
# in an additional dict inventory[inventory_node_name] loaded from custom_inventory.yaml,
# or skip the original context from 'cookiecutter' object and iterate only custom inventory.
- linux_network_interfaces: {{ node['parameters']['linux']['network']['interface'] }}
+ linux_network_interfaces:
+ {{ toyaml( node['parameters']['linux']['network']['interface'], width=14 ) }}
{%- endif %}
classes:
- environment.{{ cookiecutter.cluster_name }}.networking