HeavyHorst / remco

remco is a lightweight configuration management tool

Home Page:https://heavyhorst.github.io/remco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for indent for toYaml

freeseacher opened this issue · comments

hi!
Please add support to setting starting indent for toYaml.
like this one https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#filters-for-formatting-data

i have to add something like
{{ config | toYaml(indent=2) }}

Our yaml library supports custom indentation (https://godoc.org/gopkg.in/yaml.v3#Encoder.SetIndent).
Should be easy.

This is now possible with the latest master branch.

The Syntax:
{{ config | toYAML:"indent=2" }}